Date: Sun, 11 Jul 1999 14:13:00 -0400 (EDT) From: "Brian F. Feldman" <green@FreeBSD.org> To: Niall Smart <niall@pobox.com> Cc: hackers@FreeBSD.org Subject: Re: a BSD identd Message-ID: <Pine.BSF.4.10.9907111408060.25135-100000@janus.syracuse.net> In-Reply-To: <3788A49D.69D6DB6A@pobox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 11 Jul 1999, Niall Smart wrote: > > > 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). Good idea. I'll have it check to see that it's a regular file. > > + 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. If pw lookup for that uid succeeded before, why won't it succeed now? In fact, I didn't even need the "pw = ", but that would be depending on current static behavior... > > Regards, > > Niall > Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ 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?Pine.BSF.4.10.9907111408060.25135-100000>