mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
Add O_CLOEXEC to flopen
Requested by: jilles
This commit is contained in:
parent
b3075010f8
commit
ede89d5db2
2 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue