Replace the condemned access(2) by stat(2),

as per the discussion in -audit.
This commit is contained in:
Yaroslav Tykhiy 2001-08-08 21:22:48 +00:00
parent d118197980
commit d691b79fbc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81309

View File

@ -412,6 +412,7 @@ int
hide(pw)
struct passwd *pw;
{
struct stat st;
char buf[MAXPATHLEN];
if (!pw->pw_dir)
@ -419,7 +420,7 @@ hide(pw)
snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, _PATH_NOFINGER);
if (access(buf, F_OK) == 0)
if (stat(buf, &st) == 0)
return 1;
return 0;