Check for "NONEXISTENT" in "src/pwck.c"
This commit is contained in:
parent
c56fe7117b
commit
c040058fe3
12
src/pwck.c
12
src/pwck.c
@ -527,12 +527,16 @@ static void check_pw_file (int *errors, bool *changed)
|
|||||||
* Make sure the home directory exists
|
* Make sure the home directory exists
|
||||||
*/
|
*/
|
||||||
if (!quiet && (access (pwd->pw_dir, F_OK) != 0)) {
|
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)
|
||||||
*/
|
*/
|
||||||
printf (_("user '%s': directory '%s' does not exist\n"),
|
if (NULL == nonexistent || strcmp (pwd->pw_dir, nonexistent) != 0) {
|
||||||
pwd->pw_name, pwd->pw_dir);
|
printf (_("user '%s': directory '%s' does not exist\n"),
|
||||||
*errors += 1;
|
pwd->pw_name, pwd->pw_dir);
|
||||||
|
*errors += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user