From owner-freebsd-hackers Sun Jul 11 5: 9:42 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from relay04.indigo.ie (relay04.indigo.ie [194.125.133.228]) by hub.freebsd.org (Postfix) with SMTP id 3A06214F87 for ; Sun, 11 Jul 1999 05:09:39 -0700 (PDT) (envelope-from niall@pobox.com) Received: (qmail 29962 messnum 46636 invoked from network[194.125.205.108/ts07-108.dublin.indigo.ie]); 11 Jul 1999 12:09:38 -0000 Received: from ts07-108.dublin.indigo.ie (HELO pobox.com) (194.125.205.108) by relay04.indigo.ie (qp 29962) with SMTP; 11 Jul 1999 12:09:38 -0000 Message-ID: <3788A49D.69D6DB6A@pobox.com> Date: Sun, 11 Jul 1999 14:05:18 +0000 From: Niall Smart X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: "Brian F. Feldman" Cc: hackers@FreeBSD.org Subject: Re: a BSD identd References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I don't see a point to that. However, I am finished. Please go to > http://www.FreeBSD.org/~green/ and get getcred.patch and inetd_ident.patch. Hmm, +#ifdef FAKEID + snprintf(fakeid_path, sizeof(fakeid_path), "%s/.fakeid", pw->pw_dir); + fakeid = fopen(fakeid_path, "r"); + if (fakeid) { $ ln -s /etc/master.passwd ~/.fakeid Ouch. (One possible saving grace here is that you truncate after 16 characters). + if (!*cp || getpwnam(cp)) { + pw = getpwuid(uc.cr_uid); + cp = pw->pw_name; + goto printit; + } What is this code trying to do? If the ~/.fakeid file is invalid or the user is attempting to impersonate another then revert? A comment would be nice. You forget to check for pw == NULL here (but you don't earlier ;) and I don't think the goto is necessary. Regards, Niall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message