diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-29 18:06:09 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-29 18:06:09 +0000 |
commit | 955a095f02cda3bf4ac1e3bd760317addf54b19a (patch) | |
tree | 8e3d9c1f1ef1823e7aa33f9910a37f56277eedeb /libutil | |
parent | cb57f04cb26553c23feb9874da15b4386f68a98f (diff) | |
download | pw-darwin-955a095f02cda3bf4ac1e3bd760317addf54b19a.tar.gz pw-darwin-955a095f02cda3bf4ac1e3bd760317addf54b19a.tar.zst pw-darwin-955a095f02cda3bf4ac1e3bd760317addf54b19a.zip |
backout r242319, racy and not done in the right place
Reported by: Garrett Cooper <yanegomi@gmail.com>
Diffstat (limited to 'libutil')
-rw-r--r-- | libutil/gr_util.c | 9 | ||||
-rw-r--r-- | libutil/pw_util.c | 9 |
2 files changed, 0 insertions, 18 deletions
diff --git a/libutil/gr_util.c b/libutil/gr_util.c index 323d3ff..6d96d5e 100644 --- a/libutil/gr_util.c +++ b/libutil/gr_util.c @@ -63,7 +63,6 @@ static const char group_line_format[] = "%s:%s:%ju:"; 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 *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; return (0); } diff --git a/libutil/pw_util.c b/libutil/pw_util.c index 6013e6d..4bf3001 100644 --- a/libutil/pw_util.c +++ b/libutil/pw_util.c @@ -96,7 +96,6 @@ pw_init(const char *dir, const char *master) #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 *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 * process, and is therefore disabled until someone can conceive |