getpwuid vs. getpwnam

John Cecere John.Cecere at Sun.COM
Sat Dec 4 05:25:36 EST 2004



Gert Doering wrote:

>Hi,
>
>On Fri, Dec 03, 2004 at 11:53:11AM -0500, John Cecere wrote:
>  
>
>>An example of this would be Hylafax. It installs a fax user with the 
>>same uid as uucp, but with a separate home directory.
>>    
>>
>
>That's a setup error.  The whole point of a fax user is "have something
>with different *privileges* from other users on the system".
>  
>
Most likely you're right. I was just trying to make the point that two 
user names with two separate home directories, even though they have the 
same uid, will have two different environments, and this separation 
exists because their home directories are different.

>
>On the original topic, I wonder why ssh isn't just using $HOME?  The
>whole getpwnam()/getpwuid() approach sounds overly complicated to me
>(and I can't see any security issue if all file accesses are done
>with proper user permissions, which I assume to be the case).
>  
>
Excellent point. I agree with this completely.

>gert
>  
>
Thanks,
John

-- 
John Cecere
Sun Microsystems
732-302-3922 / john.cecere at sun.com




More information about the openssh-unix-dev mailing list