* src/passwd.c: Exit immediately when unlocking a password would
result in a passwordless account. This avoid printing a success message after the warning.
This commit is contained in:
parent
ee7af4d7e2
commit
61939960cc
@ -1,3 +1,9 @@
|
|||||||
|
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/passwd.c: Exit immediately when unlocking a password would
|
||||||
|
result in a passwordless account. This avoid printing a success
|
||||||
|
message after the warning.
|
||||||
|
|
||||||
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
2009-05-07 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/nologin.c: Include <stdlib.h> to get EXIT_FAILURE.
|
* src/nologin.c: Include <stdlib.h> to get EXIT_FAILURE.
|
||||||
|
@ -519,9 +519,10 @@ static char *update_crypt_pw (char *cp)
|
|||||||
if (uflg && *cp == '!') {
|
if (uflg && *cp == '!') {
|
||||||
if (cp[1] == '\0') {
|
if (cp[1] == '\0') {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: unlocking the password would result in a passwordless account.\n"
|
_("%s: unlocking the password would result in a passwordless account.\n"
|
||||||
"You should set a password with usermod -p to unlock the password of this account.\n"),
|
"You should set a password with usermod -p to unlock the password of this account.\n"),
|
||||||
Prog);
|
Prog);
|
||||||
|
fail_exit (E_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user