From owner-freebsd-hackers Tue Feb 9 20:03:01 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA03426 for freebsd-hackers-outgoing; Tue, 9 Feb 1999 20:03:01 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.240.222]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA03421 for ; Tue, 9 Feb 1999 20:03:00 -0800 (PST) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.9.2/8.9.1) id UAA98421; Tue, 9 Feb 1999 20:02:59 -0800 (PST) (envelope-from mph) Date: Tue, 9 Feb 1999 20:02:59 -0800 From: Matthew Hunt To: hackers@FreeBSD.ORG Cc: GReg Sutter Subject: Proposal: Ignore .nofinger for root Message-ID: <19990209200259.A98301@wopr.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 * 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