aboutsummaryrefslogtreecommitdiff
path: root/loginutils/addgroup.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /loginutils/addgroup.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip
attempt to regularize atoi mess.
Diffstat (limited to 'loginutils/addgroup.c')
-rw-r--r--loginutils/addgroup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 236dc1099..0172e6041 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -91,15 +91,14 @@ int addgroup_main(int argc, char **argv)
91 91
92 /* check for min, max and missing args and exit on error */ 92 /* check for min, max and missing args and exit on error */
93 opt_complementary = "-1:?2:?"; 93 opt_complementary = "-1:?2:?";
94
95 if (getopt32(argc, argv, "g:", &group)) { 94 if (getopt32(argc, argv, "g:", &group)) {
96 gid = bb_xgetlarg(group, 10, 0, LONG_MAX); 95 gid = xatoul_range(group, 0, (gid_t)ULONG_MAX);
97 } 96 }
98 /* move past the commandline options */ 97 /* move past the commandline options */
99 argv += optind; 98 argv += optind;
100 99
101 /* need to be root */ 100 /* need to be root */
102 if(geteuid()) { 101 if (geteuid()) {
103 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); 102 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
104 } 103 }
105 104