[Pkg-shadow-commits] r1387 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Nov 17 22:05:31 UTC 2007
Author: nekral-guest
Date: 2007-11-17 22:05:31 +0000 (Sat, 17 Nov 2007)
New Revision: 1387
Modified:
upstream/trunk/ChangeLog
upstream/trunk/NEWS
upstream/trunk/src/passwd.c
Log:
Same fixes as applied to usermod: refuse to unlock an account when it
would result in a passwordless account.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-11-17 22:02:22 UTC (rev 1386)
+++ upstream/trunk/ChangeLog 2007-11-17 22:05:31 UTC (rev 1387)
@@ -3,6 +3,7 @@
* NEWS, src/usermod.c: Refuse to unlock an account when it would
result in a passwordless account. Based on Openwall's patch
shadow-4.0.4.1-owl-usermod-unlock.diff.
+ * NEWS, src/passwd.c: Likewise.
2007-11-17 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS 2007-11-17 22:02:22 UTC (rev 1386)
+++ upstream/trunk/NEWS 2007-11-17 22:05:31 UTC (rev 1387)
@@ -21,7 +21,7 @@
(i.e. lookup in the local database for an user with an @). Thanks to
Mike Frysinger for the patch.
- Add support for uClibc with no l64a().
-- userdel/usermod: Fix infinite loop caused by erroneous group file
+- userdel, usermod: Fix infinite loop caused by erroneous group file
containing two entries with the same name. (The fix strategy differs
from
(https://bugzilla.redhat.com/show_bug.cgi?id=240915)
@@ -41,7 +41,7 @@
were always missing.
- su: Avoid terminating the PAM library in the forked child. This is done
later in the parent after closing the PAM session.
-- usermod: Refuse to unlock an account when it would result in a
+- passwd, usermod: Refuse to unlock an account when it would result in a
passwordless account.
*** documentation:
Modified: upstream/trunk/src/passwd.c
===================================================================
--- upstream/trunk/src/passwd.c 2007-11-17 22:02:22 UTC (rev 1386)
+++ upstream/trunk/src/passwd.c 2007-11-17 22:05:31 UTC (rev 1387)
@@ -438,8 +438,16 @@
if (dflg)
cp = ""; /* XXX warning: const */
- if (uflg && *cp == '!')
- cp++;
+ if (uflg && *cp == '!') {
+ if (cp[1] == '\0') {
+ fprintf (stderr,
+ _("%s: unlocking the user would result in a passwordless account.\n"
+ "You should set a password with usermod -p to unlock this user account.\n"),
+ Prog);
+ } else {
+ cp++;
+ }
+ }
if (lflg && *cp != '!') {
char *newpw = xmalloc (strlen (cp) + 2);
More information about the Pkg-shadow-commits
mailing list