diff options
author | Diomidis Spinellis <dds@FreeBSD.org> | 2005-09-19 10:11:47 +0000 |
---|---|---|
committer | Diomidis Spinellis <dds@FreeBSD.org> | 2005-09-19 10:11:47 +0000 |
commit | d2e4ea2a51f8a2a0913c16ac5473eaa3f7cdd033 (patch) | |
tree | b9e9a486c907a4c31419775d1ae3f05e395fd2ba /usr.bin/finger/util.c | |
parent | 8f3d766b5de5fcdea200733976964ea70fa0981f (diff) | |
download | src-d2e4ea2a51f8a2a0913c16ac5473eaa3f7cdd033.tar.gz src-d2e4ea2a51f8a2a0913c16ac5473eaa3f7cdd033.zip |
Setting .nofinger will not hide you from root.
Notes
Notes:
svn path=/head/; revision=150316
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 3ac5a068331c..a84c711745c7 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); |