diff options
Diffstat (limited to 'loginutils/addgroup.c')
-rw-r--r-- | loginutils/addgroup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 236dc10..0172e60 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -91,15 +91,14 @@ int addgroup_main(int argc, char **argv) /* check for min, max and missing args and exit on error */ opt_complementary = "-1:?2:?"; - if (getopt32(argc, argv, "g:", &group)) { - gid = bb_xgetlarg(group, 10, 0, LONG_MAX); + gid = xatoul_range(group, 0, (gid_t)ULONG_MAX); } /* move past the commandline options */ argv += optind; /* need to be root */ - if(geteuid()) { + if (geteuid()) { bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); } |