cvs commit: src/libexec/rexecd rexecd.c

Jacques Vidrine nectar at FreeBSD.org
Sun Apr 10 17:07:59 PDT 2005


On Apr 8, 2005, at 10:58 PM, Dag-Erling Smørgrav wrote:

> Jacques Vidrine <nectar at FreeBSD.org> writes:
>> Thanks for fixing, DES.   Only, you have re-introduced some of the
>> bugs.  You need to use getpwnam_r or copy the contents of the returned
>> struct passwd before continuing.
>
> Hmm, actually it should be sufficient to re-getpwnam() after the call
> to pam_setcred() in the child.  There's nothing else that has the
> potential to screw up pwd.

Yes, it would be sufficient, but wasteful (^_^).  But, I'm not too 
concerned.  (BTW, getpwnam is just a wrapper for getpwnam_r).

Cheers,
-- 
Jacques A Vidrine / NTT/Verio
nectar at celabo.org / jvidrine at verio.net / nectar at freebsd.org



More information about the cvs-src mailing list