svn commit: r242324 - head/lib/libutil
Baptiste Daroussin
bapt at FreeBSD.org
Mon Oct 29 18:06:10 UTC 2012
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 at 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
More information about the svn-src-head
mailing list