From cef9b65376a044309f74b77860ccf3c48a4ae315 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 18 Apr 2017 14:56:51 +0200 Subject: Assume that O_CLOEXEC is always defined and works --- nss/nss_db/db-open.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'nss/nss_db') diff --git a/nss/nss_db/db-open.c b/nss/nss_db/db-open.c index 42ce00fe3b..1c58bd1c54 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; -- cgit 1.4.1