[Pkg-shadow-commits] r3482 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Sun Sep 18 17:29:52 UTC 2011
Author: nekral-guest
Date: 2011-09-18 17:29:52 +0000 (Sun, 18 Sep 2011)
New Revision: 3482
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/newusers.c
Log:
* src/newusers.c: Initially set the passwd's password to '*'
instead of 'x'. Only when it is confirmed that a shadow entry is
(will be) added, set the passwd's password to 'x'.
* src/newusers.c: An invalid line is an error. A failure needs to
be reported.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2011-09-18 17:27:18 UTC (rev 3481)
+++ upstream/trunk/ChangeLog 2011-09-18 17:29:52 UTC (rev 3482)
@@ -1,5 +1,13 @@
2011-09-18 Nicolas François <nicolas.francois at centraliens.net>
+ * src/newusers.c: Initially set the passwd's password to '*'
+ instead of 'x'. Only when it is confirmed that a shadow entry is
+ (will be) added, set the passwd's password to 'x'.
+ * src/newusers.c: An invalid line is an error. A failure needs to
+ be reported.
+
+2011-09-18 Nicolas François <nicolas.francois at centraliens.net>
+
* src/gpasswd.c: Remove log_gpasswd_success_gshadow(). Writing in
gshadowis the last sub-task.
Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c 2011-09-18 17:27:18 UTC (rev 3481)
+++ upstream/trunk/src/newusers.c 2011-09-18 17:29:52 UTC (rev 3482)
@@ -2,7 +2,7 @@
* Copyright (c) 1990 - 1993, Julianne Frances Haugh
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2000 - 2006, Tomasz Kłoczko
- * Copyright (c) 2007 - 2009, Nicolas François
+ * Copyright (c) 2007 - 2011, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -268,7 +268,7 @@
return -1;
}
- grent.gr_passwd = "x"; /* XXX warning: const */
+ grent.gr_passwd = "*"; /* XXX warning: const */
members[0] = NULL;
grent.gr_mem = members;
@@ -287,16 +287,13 @@
}
#endif
- if (gr_update (&grent) == 0) {
- return -1;
- }
-
#ifdef SHADOWGRP
if (is_shadow_grp) {
struct sgrp sgrent;
char *admins[1];
sgrent.sg_name = grent.gr_name;
sgrent.sg_passwd = "*"; /* XXX warning: const */
+ grent.gr_passwd = "x"; /* XXX warning: const */
admins[0] = NULL;
sgrent.sg_adm = admins;
sgrent.sg_mem = members;
@@ -307,6 +304,10 @@
}
#endif
+ if (gr_update (&grent) == 0) {
+ return -1;
+ }
+
return 0;
}
@@ -890,6 +891,7 @@
if (nfields != 6) {
fprintf (stderr, _("%s: line %d: invalid line\n"),
Prog, line);
+ errors++
continue;
}
More information about the Pkg-shadow-commits
mailing list