From owner-svn-src-head@FreeBSD.ORG Mon Oct 29 18:06:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 826D5E7F; Mon, 29 Oct 2012 18:06:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687558FC0A; Mon, 29 Oct 2012 18:06:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9TI6AeV015264; Mon, 29 Oct 2012 18:06:10 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9TI6AeU015261; Mon, 29 Oct 2012 18:06:10 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210291806.q9TI6AeU015261@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 29 Oct 2012 18:06:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242324 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 18:06:10 -0000 Author: bapt Date: Mon Oct 29 18:06:09 2012 New Revision: 242324 URL: http://svn.freebsd.org/changeset/base/242324 Log: backout r242319, racy and not done in the right place Reported by: Garrett Cooper 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 Mon Oct 29 18:04:38 2012 (r242323) +++ head/lib/libutil/gr_util.c Mon Oct 29 18:06:09 2012 (r242324) @@ -63,7 +63,6 @@ static const char group_line_format[] = int gr_init(const char *dir, const char *group) { - struct stat st; if (dir == NULL) { strcpy(group_dir, _PATH_ETC); @@ -91,14 +90,6 @@ gr_init(const char *dir, const char *gro strcpy(group_file, group); } - if (stat(group_file, &st) == -1) - return (-1); - - if (S_ISDIR(st.st_mode)) { - errno = EISDIR; - return (-1); - } - initialized = 1; return (0); } Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Mon Oct 29 18:04:38 2012 (r242323) +++ head/lib/libutil/pw_util.c Mon Oct 29 18:06:09 2012 (r242324) @@ -96,7 +96,6 @@ pw_init(const char *dir, const char *mas #if 0 struct rlimit rlim; #endif - struct stat st; if (dir == NULL) { strcpy(passwd_dir, _PATH_ETC); @@ -124,14 +123,6 @@ pw_init(const char *dir, const char *mas strcpy(masterpasswd, master); } - if (stat(masterpasswd, &st) == -1) - return (-1); - - if (S_ISDIR(st.st_mode)) { - errno = EISDIR; - return (-1); - } - /* * The code that follows is extremely disruptive to the calling * process, and is therefore disabled until someone can conceive