From f1f1b69dc12d489ef8b8cd1fb4114d404407e481 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 30 Jul 2007 12:32:37 +0000 Subject: addgroup: "disallow addgroup -g num user group"; make -g 0 work (Tito ) --- loginutils/adduser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loginutils/adduser.c') diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 229bd679d..6c69aaf41 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -179,8 +179,8 @@ int adduser_main(int argc, char **argv) pw.pw_shell = (char *)DEFAULT_SHELL; pw.pw_dir = NULL; - /* check for min, max and missing args and exit on error */ - opt_complementary = "-1:?1:?"; + /* exactly one non-option arg */ + opt_complementary = "=1"; getopt32(argc, argv, "h:g:s:G:DSH", &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell, &usegroup); argv += optind; -- cgit v1.2.3