diff options
Diffstat (limited to 'usr.bin/finger/util.c')
-rw-r--r-- | usr.bin/finger/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 3ac5a06..a84c711 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -408,6 +408,7 @@ userinfo(PERSON *pn, struct passwd *pw) /* * Is this user hiding from finger? * If ~<user>/.nofinger exists, return 1 (hide), else return 0 (nohide). + * Nobody can hide from root. */ int @@ -416,7 +417,7 @@ hide(struct passwd *pw) struct stat st; char buf[MAXPATHLEN]; - if (!pw->pw_dir) + if (invoker_root || !pw->pw_dir) return 0; snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, _PATH_NOFINGER); |