]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include stdio-safer.h.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Apr 2005 20:02:43 +0000 (20:02 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Apr 2005 20:02:43 +0000 (20:02 +0000)
(getusershell): Use fopen_safer.

lib/getusershell.c

index 015cb3404817aae355d2217715966f67d664afd3..475f32619fd5da898e6ee4d5f45837f6602e801b 100644 (file)
@@ -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.  */