diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-04-18 14:56:51 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-04-18 14:56:51 +0200 |
commit | cef9b65376a044309f74b77860ccf3c48a4ae315 (patch) | |
tree | c934a9b57903468b9a2754c1cf8f99f2a94c9269 /nss/nss_db | |
parent | b48061e1a534a2421c65e4258418d41a5335ba32 (diff) | |
download | glibc-cef9b65376a044309f74b77860ccf3c48a4ae315.zip glibc-cef9b65376a044309f74b77860ccf3c48a4ae315.tar.gz glibc-cef9b65376a044309f74b77860ccf3c48a4ae315.tar.bz2 |
Assume that O_CLOEXEC is always defined and works
Diffstat (limited to 'nss/nss_db')
-rw-r--r-- | nss/nss_db/db-open.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/nss/nss_db/db-open.c b/nss/nss_db/db-open.c index 42ce00f..1c58bd1 100644 --- a/nss/nss_db/db-open.c +++ b/nss/nss_db/db-open.c @@ -36,11 +36,7 @@ internal_setent (const char *file, struct nss_db_map *mapping) { enum nss_status status = NSS_STATUS_UNAVAIL; - int mode = O_RDONLY | O_LARGEFILE; -#ifdef O_CLOEXEC - mode |= O_CLOEXEC; -#endif - int fd = open_not_cancel_2 (file, mode); + int fd = open_not_cancel_2 (file, O_RDONLY | O_LARGEFILE | O_CLOEXEC); if (fd != -1) { struct nss_db_header header; |