aboutsummaryrefslogtreecommitdiff
path: root/loginutils/adduser.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/adduser.c')
-rw-r--r--loginutils/adduser.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 8b92df923..b2b5be5b3 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -201,12 +201,15 @@ int adduser_main(int argc UNUSED_PARAM, char **argv)
201 pw.pw_shell = (char *)get_shell_name(); 201 pw.pw_shell = (char *)get_shell_name();
202 pw.pw_dir = NULL; 202 pw.pw_dir = NULL;
203 203
204 /* at least one and at most two non-option args */ 204 opts = getopt32long(argv, "^"
205 /* disable interactive passwd for system accounts */ 205 "h:g:s:G:DSHu:k:"
206 opt_complementary = "-1:?2:SD"; 206 /* at least one and at most two non-option args */
207 opts = getopt32long(argv, "h:g:s:G:DSHu:k:", adduser_longopts, 207 /* disable interactive passwd for system accounts */
208 "\0" "-1:?2:SD",
209 adduser_longopts,
208 &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell, 210 &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell,
209 &usegroup, &uid, &skel); 211 &usegroup, &uid, &skel
212 );
210 if (opts & OPT_UID) 213 if (opts & OPT_UID)
211 pw.pw_uid = xatou_range(uid, 0, CONFIG_LAST_ID); 214 pw.pw_uid = xatou_range(uid, 0, CONFIG_LAST_ID);
212 215