summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2001-08-08 21:22:48 +0000
committeryar <yar@FreeBSD.org>2001-08-08 21:22:48 +0000
commitcf93cda491a8895bb661375c4e88200bc5c277d0 (patch)
tree8f2c96ad230a916544bf00c4d4b2d520965433e6 /usr.bin/finger
parent1382e23198a46e54a79f4865ff5317e78f439e20 (diff)
downloadFreeBSD-src-cf93cda491a8895bb661375c4e88200bc5c277d0.zip
FreeBSD-src-cf93cda491a8895bb661375c4e88200bc5c277d0.tar.gz
Replace the condemned access(2) by stat(2),
as per the discussion in -audit.
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c
index 93b4889..5095abc 100644
--- a/usr.bin/finger/util.c
+++ b/usr.bin/finger/util.c
@@ -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;
OpenPOWER on IntegriCloud