usermod, newusers, prefix: enforce absolute paths for homedir
useradd already was enforcing this, but these were not. Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
@@ -1110,6 +1110,12 @@ static void process_flags (int argc, char **argv)
|
||||
}
|
||||
dflg = true;
|
||||
user_newhome = optarg;
|
||||
if (user_newhome[0] != '/') {
|
||||
fprintf (stderr,
|
||||
_("%s: homedir must be an absolute path\n"),
|
||||
Prog);
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
if ('\0' != *optarg) {
|
||||
|
Reference in New Issue
Block a user