mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Add O_CLOEXEC to flopen
Requested by: jilles
This commit is contained in:
parent
b3075010f8
commit
ede89d5db2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244744
@ -101,7 +101,7 @@ gr_lock(void)
|
||||
for (;;) {
|
||||
struct stat st;
|
||||
|
||||
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK, 0);
|
||||
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
|
||||
if (lockfd == -1) {
|
||||
if (errno == EWOULDBLOCK) {
|
||||
errx(1, "the group file is busy");
|
||||
|
@ -179,7 +179,7 @@ pw_lock(void)
|
||||
for (;;) {
|
||||
struct stat st;
|
||||
|
||||
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK, 0);
|
||||
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
|
||||
if (lockfd == -1) {
|
||||
if (errno == EWOULDBLOCK) {
|
||||
errx(1, "the password db file is busy");
|
||||
|
Loading…
Reference in New Issue
Block a user