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

as per the discussion in -audit.
This commit is contained in:
yar 2001-08-08 21:22:48 +00:00
parent 1382e23198
commit cf93cda491

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;