From owner-svn-src-all@FreeBSD.ORG Thu Dec 27 20:24:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FEB262C; Thu, 27 Dec 2012 20:24:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 547788FC0A; Thu, 27 Dec 2012 20:24:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBRKOjLL050738; Thu, 27 Dec 2012 20:24:45 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBRKOjXd050735; Thu, 27 Dec 2012 20:24:45 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201212272024.qBRKOjXd050735@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 27 Dec 2012 20:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244744 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2012 20:24:45 -0000 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");