From: Tomas Mraz Date: Thu, 25 Aug 2016 09:20:34 +0000 (+0200) Subject: Fix regression in useradd not loading defaults properly. X-Git-Tag: 4.5~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F33%2Fhead;p=thirdparty%2Fshadow.git Fix regression in useradd not loading defaults properly. The get_defaults() has to be called before processing the flags. Signed-off-by: Tomáš Mráz --- diff --git a/src/useradd.c b/src/useradd.c index fefa234cb..6c43e7e3e 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2027,6 +2027,8 @@ int main (int argc, char **argv) is_shadow_grp = sgr_file_present (); #endif + get_defaults (); + process_flags (argc, argv); #ifdef ENABLE_SUBIDS @@ -2036,8 +2038,6 @@ int main (int argc, char **argv) (!user_id || (user_id <= uid_max && user_id >= uid_min)); #endif /* ENABLE_SUBIDS */ - get_defaults (); - #ifdef ACCT_TOOLS_SETUID #ifdef USE_PAM {