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 _ __ ___ ____ ___ ___ ___
[EMAIL PROTECTED] _ __ ___ | _ ) __| \
FreeBSD: The Power to Serve! _ __ | _ \._ \ |) |
http://www.FreeBSD.org/ _ |___/___/___/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message