Date: Tue, 9 Feb 1999 20:02:59 -0800 From: Matthew Hunt <mph@pobox.com> To: hackers@FreeBSD.ORG Cc: GReg Sutter <gsutter@pobox.com> Subject: Proposal: Ignore .nofinger for root Message-ID: <19990209200259.A98301@wopr.caltech.edu>
next in thread | raw e-mail | index | archive | help
I propose the following change to src/usr.bin/finger to ignore
~/.nofinger when finger(1) is run by root. We ship inetd.conf
with fingerd running as nobody, so all remote requests still honor
~/.nofinger.
Comments?
Index: finger.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/finger/finger.1,v
retrieving revision 1.7
diff -u -r1.7 finger.1
--- finger.1 1997/08/01 20:26:47 1.7
+++ finger.1 1999/02/10 04:00:16
@@ -184,7 +184,9 @@
.Dq Pa .nofinger
exists in the user's home directory,
.Nm finger
-behaves as if the user in question does not exist.
+behaves as if the user in question does not exist, unless
+.Nm finger
+is run by the superuser.
.Sh ENVIRONMENT
.Nm Finger
utilizes the following environment variable, if it exists:
Index: util.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/finger/util.c,v
retrieving revision 1.5
diff -u -r1.5 util.c
--- util.c 1997/07/02 06:34:51 1.5
+++ util.c 1999/02/10 03:40:17
@@ -393,6 +393,9 @@
{
char buf[MAXPATHLEN+1];
+ if (!geteuid())
+ return 0;
+
if (!pw->pw_dir)
return 0;
--
Matthew Hunt <mph@pobox.com> * Inertia is a property of matter.
http://www.pobox.com/~mph/pgp.key for PGP public key 0x67203349.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990209200259.A98301>
