diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 04:37:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 04:37:19 +0200 |
commit | 3d0805e9e7c45e6c0f9fb5e587d8b4a5a5f3c74c (patch) | |
tree | d950f4ca13fcd5993a34daf36b61f719e226497a /libpwdgrp | |
parent | 526d85831e7480b9c7a3673d8dd356a438e6dd74 (diff) |
libbb: make parse_chown_usergroup_or_die() set unspecified uid/gid to -1
function old new delta
parse_chown_usergroup_or_die 102 115 +13
chown_main 190 175 -15
start_stop_daemon_main 1043 1027 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 13/-31) Total: -18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libpwdgrp')
-rw-r--r-- | libpwdgrp/uidgid_get.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpwdgrp/uidgid_get.c b/libpwdgrp/uidgid_get.c index eeb65191f..1199f23f9 100644 --- a/libpwdgrp/uidgid_get.c +++ b/libpwdgrp/uidgid_get.c @@ -90,6 +90,8 @@ void FAST_FUNC parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_gr { char *group; + u->uid = u->gid = (gid_t)-1L; + /* Check if there is a group name */ group = strchr(user_group, '.'); /* deprecated? */ if (!group) |