mirror of https://github.com/mirror/busybox.git
Patch from tito to add argument checking.
parent
e11db0ed35
commit
d2bd7d8dd5
|
@ -148,7 +148,7 @@ int addgroup_main(int argc, char **argv)
|
||||||
|
|
||||||
/* get remaining args */
|
/* get remaining args */
|
||||||
if(bb_getopt_ulflags(argc, argv, "g:", &group)) {
|
if(bb_getopt_ulflags(argc, argv, "g:", &group)) {
|
||||||
gid = strtol(group, NULL, 10);
|
gid = bb_xgetlarg(group, 10, 0, LONG_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
|
@ -160,10 +160,10 @@ int addgroup_main(int argc, char **argv)
|
||||||
|
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
user = argv[optind];
|
user = argv[optind];
|
||||||
optind++;
|
|
||||||
} else {
|
} else {
|
||||||
user = "";
|
user = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if_i_am_not_root();
|
if_i_am_not_root();
|
||||||
|
|
||||||
/* werk */
|
/* werk */
|
||||||
|
|
Loading…
Reference in New Issue