Date: Mon, 29 Oct 2012 18:06:10 +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: r242324 - head/lib/libutil Message-ID: <201210291806.q9TI6AeU015261@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <yanegomi@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210291806.q9TI6AeU015261>