Check for "NONEXISTENT" in "src/pwck.c"
This commit is contained in:
parent
c56fe7117b
commit
c040058fe3
@ -527,14 +527,18 @@ static void check_pw_file (int *errors, bool *changed)
|
||||
* Make sure the home directory exists
|
||||
*/
|
||||
if (!quiet && (access (pwd->pw_dir, F_OK) != 0)) {
|
||||
const char *nonexistent = getdef_str("NONEXISTENT");
|
||||
|
||||
/*
|
||||
* Home directory doesn't exist, give a warning
|
||||
* Home directory does not exist, give a warning (unless intentional)
|
||||
*/
|
||||
if (NULL == nonexistent || strcmp (pwd->pw_dir, nonexistent) != 0) {
|
||||
printf (_("user '%s': directory '%s' does not exist\n"),
|
||||
pwd->pw_name, pwd->pw_dir);
|
||||
*errors += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure the login shell is executable
|
||||
|
Loading…
Reference in New Issue
Block a user