Your message dated Sat, 26 Jan 2008 20:45:32 -0500
with message-id <[EMAIL PROTECTED]>
and subject line chown uses getpwnam for uidnumbers
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: fileutils
Version: 4.0l-8

ltrace of chown:

# ltrace chown 100:200 test           
__libc_start_main(0x08049334, 3, 0xbffffd84, 0x0804899c, 0x08049e7c <unfinished 
...>
__register_frame_info(0x0804b838, 0x0804b9b4, 0xbffffd28, 0x40035e68, 
0x400eccd8) = 0x400ed880
setlocale(6, "")                                  = "C"
bindtextdomain("fileutils", "/usr/share/locale")  = "/usr/share/locale"
textdomain("fileutils")                           = "fileutils"
getopt_long(3, 0xbffffd84, "Rcfhv", 0x08049ec0, NULL) = -1
strcpy(0xbffffc24, "100:200")                     = 0xbffffc24
strchr("100:200", ':')                            = ":200"
getpwnam("100" <unfinished ...>

Here I specify a uidNumber and gidNumber and instead of using getpwuid, chown 
uses getpwnam. This results in hangups when using nss_ldap for nss resolving.

The documentation for chown states that it should take UIDs aswell as 
UIDnumbers. 

I think the 'passwd' lib for nss cathes this bug in the normal situation when 
using a default nsswitch.conf.

I suggest that chown has to determine whether it gets an uid or an uidnumber 
and use getpwnam resp. getpwuid for resolving


With kind regards,

Wim Fournier
Kern Automatiseringsdiensten 
Kruislaan 419, Amsterdam
The Netherlands



--- End Message ---
--- Begin Message --- Posix requies that a numeric parameter be treated as a username if such a username exists. Thus, chown has to use getpwnam.

Mike Stone


--- End Message ---

Reply via email to