[Pkg-shadow-devel] patch for su - 2

Alexander Gattin arg@online.com.ua
Sat, 4 Jun 2005 01:18:00 +0300


Hi!!

On Fri, Jun 03, 2005 at 01:24:41AM +0200, Nicolas François wrote:
> UID 0 is not necessary named root.

Yes!

> This patch retrieve the username of the user with UID 0.

But which one (root, sashroot, toor?) ;) if there are
several usernames with uid == 0?

// answer is probably: "the 1st one" :)

> Goal: don't assume uid 0 == "root", use getpwuid to fetch it
> Fixes: #81924

As for bug #81924 -- this patch suffices. In general,
su manpage should clearly state that `su` or `su -`
switches to first username that has zero uid.

Tomasz, Nicolas -- what do you think about it?

-- 
WBR,
xrgtn