+2011-09-18 Nicolas François <nicolas.francois@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@centraliens.net>
* src/gpasswd.c: Remove log_gpasswd_success_gshadow(). Writing in
* 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
return -1;
}
- grent.gr_passwd = "x"; /* XXX warning: const */
+ grent.gr_passwd = "*"; /* XXX warning: const */
members[0] = NULL;
grent.gr_mem = members;
}
#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;
}
#endif
+ if (gr_update (&grent) == 0) {
+ return -1;
+ }
+
return 0;
}
if (nfields != 6) {
fprintf (stderr, _("%s: line %d: invalid line\n"),
Prog, line);
+ errors++
continue;
}