diff options
Diffstat (limited to 'nss/nss_compat/compat-spwd.c')
-rw-r--r-- | nss/nss_compat/compat-spwd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nss/nss_compat/compat-spwd.c b/nss/nss_compat/compat-spwd.c index ec5bf283cd..d802ee0302 100644 --- a/nss/nss_compat/compat-spwd.c +++ b/nss/nss_compat/compat-spwd.c @@ -27,6 +27,7 @@ #include <string.h> #include <libc-lock.h> #include <kernel-features.h> +#include <nss_files.h> #include "netgroup.h" #include "nisdomain.h" @@ -179,13 +180,10 @@ internal_setspent (ent_t *ent, int stayopen, int needent) if (ent->stream == NULL) { - ent->stream = fopen ("/etc/shadow", "rme"); + ent->stream = __nss_files_fopen ("/etc/shadow"); if (ent->stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; - else - /* We take care of locking ourself. */ - __fsetlocking (ent->stream, FSETLOCKING_BYCALLER); } else rewind (ent->stream); |