diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
commit | 312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch) | |
tree | 445eab9ef93914585b6625aa6ca93c24715771b7 /nss/nss_files | |
parent | 82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff) | |
download | glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.bz2 glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip |
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'nss/nss_files')
-rw-r--r-- | nss/nss_files/files-XXX.c | 2 | ||||
-rw-r--r-- | nss/nss_files/files-alias.c | 4 | ||||
-rw-r--r-- | nss/nss_files/files-initgroups.c | 2 | ||||
-rw-r--r-- | nss/nss_files/files-key.c | 2 | ||||
-rw-r--r-- | nss/nss_files/files-netgrp.c | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c index 1a6fa0ddd5..8db052903f 100644 --- a/nss/nss_files/files-XXX.c +++ b/nss/nss_files/files-XXX.c @@ -77,7 +77,7 @@ internal_setent (int stayopen) if (stream == NULL) { - stream = fopen (DATAFILE, "re"); + stream = fopen (DATAFILE, "rce"); if (stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c index 714299aadf..023021e6ce 100644 --- a/nss/nss_files/files-alias.c +++ b/nss/nss_files/files-alias.c @@ -48,7 +48,7 @@ internal_setent (void) if (stream == NULL) { - stream = fopen ("/etc/aliases", "re"); + stream = fopen ("/etc/aliases", "rce"); if (stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; @@ -258,7 +258,7 @@ get_next_alias (const char *match, struct aliasent *result, first_unused = cp; - listfile = fopen (&cp[9], "r"); + listfile = fopen (&cp[9], "rce"); /* If the file does not exist we simply ignore the statement. */ if (listfile != NULL diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c index 2f88f602e7..3a3b5c1e38 100644 --- a/nss/nss_files/files-initgroups.c +++ b/nss/nss_files/files-initgroups.c @@ -30,7 +30,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start, long int *size, gid_t **groupsp, long int limit, int *errnop) { - FILE *stream = fopen ("/etc/group", "re"); + FILE *stream = fopen ("/etc/group", "rce"); if (stream == NULL) { *errnop = errno; diff --git a/nss/nss_files/files-key.c b/nss/nss_files/files-key.c index fb108c8092..cb39204825 100644 --- a/nss/nss_files/files-key.c +++ b/nss/nss_files/files-key.c @@ -33,7 +33,7 @@ extern int xdecrypt (char *, char *); static enum nss_status search (const char *netname, char *result, int *errnop, int secret) { - FILE *stream = fopen (DATAFILE, "re"); + FILE *stream = fopen (DATAFILE, "rce"); if (stream == NULL) return errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c index 4b5d774fdd..f70196bc7e 100644 --- a/nss/nss_files/files-netgrp.c +++ b/nss/nss_files/files-netgrp.c @@ -1,5 +1,5 @@ /* Netgroup file parser in nss_files modules. - Copyright (C) 1996, 1997, 2000, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2004, 2005, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -63,7 +63,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result) return NSS_STATUS_UNAVAIL; /* Find the netgroups file and open it. */ - fp = fopen (DATAFILE, "r"); + fp = fopen (DATAFILE, "rce"); if (fp == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; else |