Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 1999 14:05:18 +0000
From:      Niall Smart <niall@pobox.com>
To:        "Brian F. Feldman" <green@FreeBSD.org>
Cc:        hackers@FreeBSD.org
Subject:   Re: a BSD identd
Message-ID:  <3788A49D.69D6DB6A@pobox.com>
References:  <Pine.BSF.4.10.9907101305240.571-100000@janus.syracuse.net>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3788A49D.69D6DB6A>