[Pkg-shadow-commits] r2864 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Sat May 9 13:14:37 UTC 2009
Author: nekral-guest
Date: 2009-05-09 13:14:37 +0000 (Sat, 09 May 2009)
New Revision: 2864
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/chpasswd.c
Log:
* src/chpasswd.c: Added the line number when an error is reported
instead of only the username.
* src/chpasswd.c: PAM enabled chpasswd do may change the password
database (for the user where the password update succeeded) even
if there were a failure for one user. Do not indicate that changes
were ignored.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-05-09 13:14:31 UTC (rev 2863)
+++ upstream/trunk/ChangeLog 2009-05-09 13:14:37 UTC (rev 2864)
@@ -1,5 +1,14 @@
2009-05-07 Nicolas François <nicolas.francois at centraliens.net>
+ * src/chpasswd.c: Added the line number when an error is reported
+ instead of only the username.
+ * src/chpasswd.c: PAM enabled chpasswd do may change the password
+ database (for the user where the password update succeeded) even
+ if there were a failure for one user. Do not indicate that changes
+ were ignored.
+
+2009-05-07 Nicolas François <nicolas.francois at 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.
Modified: upstream/trunk/src/chpasswd.c
===================================================================
--- upstream/trunk/src/chpasswd.c 2009-05-09 13:14:31 UTC (rev 2863)
+++ upstream/trunk/src/chpasswd.c 2009-05-09 13:14:37 UTC (rev 2864)
@@ -482,12 +482,12 @@
non_interactive_password = newpwd;
ret = pam_chauthtok (pamh, 0);
if (ret != PAM_SUCCESS) {
- fprintf (stderr, _("chpasswd: (user %s) pam_chauthtok() failed, error:\n"
+ fprintf (stderr, _("chpasswd: (line %d, user %s) pam_chauthtok() failed, error:\n"
" %s\n"),
- name, pam_strerror (pamh, ret));
+ line, name, pam_strerror (pamh, ret));
fprintf (stderr,
- _("chpasswd: (user %s) password unchanged\n"),
- name);
+ _("chpasswd: (line %d, user %s) password unchanged\n"),
+ line, name);
errors++;
continue;
}
@@ -582,14 +582,20 @@
* changes to be ignored. Otherwise the file is closed, causing the
* changes to be written out all at once, and then unlocked
* afterwards.
+ *
+ * With PAM, it is not possible to delay the update of the
+ * password database.
*/
if (0 != errors) {
+#ifndef USE_PAM
fprintf (stderr,
_("%s: error detected, changes ignored\n"), Prog);
+#endif
fail_exit (1);
}
#ifndef USE_PAM
+ /* Save the changes */
close_files ();
#endif
More information about the Pkg-shadow-commits
mailing list