Date: Thu, 27 Dec 2012 20:24:44 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244744 - head/lib/libutil Message-ID: <201212272024.qBRKOjXd050735@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Thu Dec 27 20:24:44 2012 New Revision: 244744 URL: http://svnweb.freebsd.org/changeset/base/244744 Log: Add O_CLOEXEC to flopen Requested by: jilles Modified: head/lib/libutil/gr_util.c head/lib/libutil/pw_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Thu Dec 27 19:43:29 2012 (r244743) +++ head/lib/libutil/gr_util.c Thu Dec 27 20:24:44 2012 (r244744) @@ -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"); Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Thu Dec 27 19:43:29 2012 (r244743) +++ head/lib/libutil/pw_util.c Thu Dec 27 20:24:44 2012 (r244744) @@ -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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212272024.qBRKOjXd050735>