backout r242319, racy and not done in the right place

Reported by:	Garrett Cooper  <yanegomi@gmail.com>
This commit is contained in:
Baptiste Daroussin 2012-10-29 18:06:09 +00:00
parent 609a74746a
commit b3d9795c98
2 changed files with 0 additions and 18 deletions

View File

@ -63,7 +63,6 @@ static const char group_line_format[] = "%s:%s:%ju:";
int int
gr_init(const char *dir, const char *group) gr_init(const char *dir, const char *group)
{ {
struct stat st;
if (dir == NULL) { if (dir == NULL) {
strcpy(group_dir, _PATH_ETC); strcpy(group_dir, _PATH_ETC);
@ -91,14 +90,6 @@ gr_init(const char *dir, const char *group)
strcpy(group_file, group); strcpy(group_file, group);
} }
if (stat(group_file, &st) == -1)
return (-1);
if (S_ISDIR(st.st_mode)) {
errno = EISDIR;
return (-1);
}
initialized = 1; initialized = 1;
return (0); return (0);
} }

View File

@ -96,7 +96,6 @@ pw_init(const char *dir, const char *master)
#if 0 #if 0
struct rlimit rlim; struct rlimit rlim;
#endif #endif
struct stat st;
if (dir == NULL) { if (dir == NULL) {
strcpy(passwd_dir, _PATH_ETC); strcpy(passwd_dir, _PATH_ETC);
@ -124,14 +123,6 @@ pw_init(const char *dir, const char *master)
strcpy(masterpasswd, master); 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 * The code that follows is extremely disruptive to the calling
* process, and is therefore disabled until someone can conceive * process, and is therefore disabled until someone can conceive