* src/pwconv.c: Fail if not called correctly.
* src/pwconv.c: At the end of main, the passwd and shadow files are locked. No need to check before unlocking.
This commit is contained in:
parent
7b0116c5b4
commit
4ce849a5ed
@ -1,3 +1,9 @@
|
||||
2011-09-18 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/pwconv.c: Fail if not called correctly.
|
||||
* src/pwconv.c: At the end of main, the passwd and shadow files
|
||||
are locked. No need to check before unlocking.
|
||||
|
||||
2011-09-18 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/newusers.c: Initially set the passwd's password to '*'
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
|
||||
* Copyright (c) 2002 - 2006, Tomasz Kłoczko
|
||||
* Copyright (c) 2009 , Nicolas François
|
||||
* Copyright (c) 2009 - 2011, Nicolas François
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -124,6 +124,7 @@ int main (int argc, char **argv)
|
||||
|
||||
if (1 != argc) {
|
||||
(void) fputs (_("Usage: pwconv\n"), stderr);
|
||||
fail_exit (E_USAGE);
|
||||
}
|
||||
Prog = Basename (argv[0]);
|
||||
|
||||
@ -260,21 +261,17 @@ int main (int argc, char **argv)
|
||||
/* continue */
|
||||
}
|
||||
|
||||
if (pw_locked) {
|
||||
if (pw_unlock () == 0) {
|
||||
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, pw_dbname ());
|
||||
SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
|
||||
/* continue */
|
||||
}
|
||||
}
|
||||
|
||||
if (spw_locked) {
|
||||
if (spw_unlock () == 0) {
|
||||
fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, spw_dbname ());
|
||||
SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
|
||||
/* continue */
|
||||
}
|
||||
}
|
||||
|
||||
nscd_flush_cache ("passwd");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user