summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-04-11 20:02:43 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-04-11 20:02:43 +0000
commitf4efb825d2c7553ed38fcac2dfe3d8dcac149e96 (patch)
treefe95c2af93aef2334ce63909de0197a34d709868 /lib
parent8bd8ca4bf3a6f1761d2d8a76fc7f89608bf474dd (diff)
downloadcoreutils-f4efb825d2c7553ed38fcac2dfe3d8dcac149e96.tar.xz
Include stdio-safer.h.
(getusershell): Use fopen_safer.
Diffstat (limited to 'lib')
-rw-r--r--lib/getusershell.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/getusershell.c b/lib/getusershell.c
index 015cb3404..475f32619 100644
--- a/lib/getusershell.c
+++ b/lib/getusershell.c
@@ -1,6 +1,6 @@
/* getusershell.c -- Return names of valid user shells.
- Copyright (C) 1991, 1997, 2000, 2001, 2003, 2004 Free Software
+ Copyright (C) 1991, 1997, 2000, 2001, 2003, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <ctype.h>
+#include "stdio-safer.h"
#include "xalloc.h"
#if USE_UNLOCKED_IO
@@ -98,7 +99,7 @@ getusershell (void)
if (shellstream == NULL)
{
- shellstream = fopen (SHELLS_FILE, "r");
+ shellstream = fopen_safer (SHELLS_FILE, "r");
if (shellstream == NULL)
{
/* No shells file. Use the default list. */