diff options
author | Denis Vlasenko | 2008-12-03 19:05:55 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-12-03 19:05:55 +0000 |
commit | d7a805efafd83203e72c334089c3f88204231ac7 (patch) | |
tree | d69521a26d050432f89cf5713aa1516f655b136f /loginutils/addgroup.c | |
parent | ac1c96f6737799d1d7f85515237df80e9da71346 (diff) | |
download | busybox-d7a805efafd83203e72c334089c3f88204231ac7.zip busybox-d7a805efafd83203e72c334089c3f88204231ac7.tar.gz |
libbb: introduce and use xgetpwnam. ~ -150 bytes.
Diffstat (limited to 'loginutils/addgroup.c')
-rw-r--r-- | loginutils/addgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 89414d7..2a840d7 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -159,6 +159,7 @@ int addgroup_main(int argc UNUSED_PARAM, char **argv) /* check if group and user exist */ xuname2uid(argv[0]); /* unknown user: exit */ xgroup2gid(argv[1]); /* unknown group: exit */ +// race here! /* check if user is already in this group */ gr = getgrnam(argv[1]); for (; *(gr->gr_mem) != NULL; (gr->gr_mem)++) { |