passwd: fix bug: we are trying to update shadow even if user's record is in passwd!
getspnam is guilty, it lies that user record exists in shadow.
This commit is contained in:
@@ -482,10 +482,10 @@ int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok);
|
||||
/* chown-like handling of "user[:[group]" */
|
||||
void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group);
|
||||
/* bb_getpwuid, bb_getgrgid:
|
||||
bb_getXXXid(buf, bufsz, id) - copy user/group name or id
|
||||
as a string to buf, return user/group name or NULL
|
||||
bb_getXXXid(NULL, 0, id) - return user/group name or NULL
|
||||
bb_getXXXid(NULL, -1, id) - return user/group name or exit
|
||||
* bb_getXXXid(buf, bufsz, id) - copy user/group name or id
|
||||
* as a string to buf, return user/group name or NULL
|
||||
* bb_getXXXid(NULL, 0, id) - return user/group name or NULL
|
||||
* bb_getXXXid(NULL, -1, id) - return user/group name or exit
|
||||
*/
|
||||
char *bb_getpwuid(char *name, int bufsize, long uid);
|
||||
char *bb_getgrgid(char *group, int bufsize, long gid);
|
||||
|
Reference in New Issue
Block a user