diff options
author | jilles <jilles@FreeBSD.org> | 2013-08-28 21:10:37 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-08-28 21:10:37 +0000 |
commit | baaacfdc28bae3ef25b6e173c058f66a64c7f18d (patch) | |
tree | 8dda6bdc0191b6bd5008300355e35de43cca06e6 /lib/libutil/login_cap.c | |
parent | 609f43ab7f3c398c0c3a4d8f093fe380c9e04b82 (diff) | |
download | FreeBSD-src-baaacfdc28bae3ef25b6e173c058f66a64c7f18d.zip FreeBSD-src-baaacfdc28bae3ef25b6e173c058f66a64c7f18d.tar.gz |
libutil: Use O_CLOEXEC for internal file descriptors from open().
Diffstat (limited to 'lib/libutil/login_cap.c')
-rw-r--r-- | lib/libutil/login_cap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index 8fee760..8915d0a 100644 --- a/lib/libutil/login_cap.c +++ b/lib/libutil/login_cap.c @@ -239,7 +239,7 @@ login_getclassbyname(char const *name, const struct passwd *pwd) break; /* Don't retry default on 'me' */ if (i == 0) r = -1; - else if ((r = open(login_dbarray[0], O_RDONLY)) >= 0) + else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0) close(r); /* * If there's at least one login class database, |