Re: getting user name from uid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Erik Mouw
[ PGP not available, raw data follows ]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, Apr 10, 2007 at 06:12:58PM +0300, Kari Hurtta wrote:
> > Deepak Joshi <deepak_cins@xxxxxxxxxxx> writes in gmane.linux.kernel.kernelnewbies:
> > 
> > > Hi all,
> > > 
> > > How can i get the user name from uid in kernel space.
> > > 
> > > Thanks,
> > > Deepak Joshi
> > 
> > I guess that NFSv4 server/client code does something similar.
> > 
> > (NFSv4 protocol passes usernames around. )
> > 
> > ( Documentation talks about id mapper daemon. )
> 
> Which runs in userspace because user *names* are a userspace thing.
> 
> The kernel doesn't care about usernames. The kernel only cares about
> user IDs. The whole issue about usernames is because we poor humans are
> much better in remembering names instead of numbers. That's why we have
> DNS to resolve www.kernelnewbies.org to 74.92.59.67. That's why your
> parents decided to call you "Kari Hurtta" instead of "6455243".

Well kernel NFSv4 code needs these usernames, because protocol uses 
them.   So because NFS server and client are on kernel space, these
usernames are no longer just userspace thing.

And I guess there is also other (network) filesystems (than NFSv4) also 
which uses _usernames_ and not user IDes. 

And some filesystems yet put even more data to kernel than just usernames.
There is also 'keyring' mechanism on linux kernel.

These all deals with user identification. That is no longer user numeric user 
IDes which kernel uses.
 
> Erik
> 
> - -- 
> They're all fools. Don't worry. Darwin may be slow, but he'll
> eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
> iD8DBQFGHAq4/PlVHJtIto0RAoyBAJ48MfNnSrNQwZXvD3wUOxl8rj+l6QCfTL4d
> 7p8lIfptTmvPsFwtWh9zh/w=
> =XGv+
> -----END PGP SIGNATURE-----
[ End of raw data. ]

/ Kari Hurtta

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux