OSDN Git Service

Change xgetpwnamid/xgetgrnamid to xgetuid/xgetgid returning the id number
authorRob Landley <rob@landley.net>
Fri, 19 Aug 2016 02:33:27 +0000 (21:33 -0500)
committerRob Landley <rob@landley.net>
Fri, 19 Aug 2016 02:33:27 +0000 (21:33 -0500)
commit3d64b0cc95c5957e53474c3e50f143c61a057104
tree0c32cb7e4d104aa5d3c1f7ee0dcb7ac1f45f3a20
parent05e1582ec435932a25db21fd3ae71fbf62a4b45d
Change xgetpwnamid/xgetgrnamid to xgetuid/xgetgid returning the id number
instead of a struct. This means it can return "12345" even if that user/group
doesn't exist in /etc/passwd and similar.

All the users were immediately dereferencing it to get pw_uid or gr_gid
anyway, so just return it directly and adjust the users. This fixes
things like "chown 12345:23456 filename".
lib/lib.h
lib/xwrap.c
toys/other/makedevs.c
toys/posix/chgrp.c
toys/posix/cp.c
toys/posix/find.c