[Pkg-shadow-commits] r2416 - in upstream/trunk: . libmisc src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun Sep 14 13:42:11 UTC 2008
Author: nekral-guest
Date: 2008-09-14 13:42:10 +0000 (Sun, 14 Sep 2008)
New Revision: 2416
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/find_new_gid.c
upstream/trunk/libmisc/find_new_uid.c
upstream/trunk/src/pwck.c
upstream/trunk/src/useradd.c
Log:
* src/useradd.c: Added missing declaration of Mflg.
* src/pwck.c: Only unlock files if they were locked before (e.g.
not in read-only mode).
* src/pwck.c: Quote the username in error messages (harmonization
with other messages).
* libmisc/find_new_gid.c: Fixed typo (s/grp->gr_gid/group_id/).
* libmisc/find_new_gid.c: Likewise.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-09-14 12:28:42 UTC (rev 2415)
+++ upstream/trunk/ChangeLog 2008-09-14 13:42:10 UTC (rev 2416)
@@ -1,3 +1,13 @@
+2008-09-14 Nicolas François <nicolas.francois at centraliens.net>
+
+ * src/useradd.c: Added missing declaration of Mflg.
+ * src/pwck.c: Only unlock files if they were locked before (e.g.
+ not in read-only mode).
+ * src/pwck.c: Quote the username in error messages (harmonization
+ with other messages).
+ * libmisc/find_new_gid.c: Fixed typo (s/grp->gr_gid/group_id/).
+ * libmisc/find_new_gid.c: Likewise.
+
2008-09-13 Nicolas François <nicolas.francois at centraliens.net>
* libmisc/setugid.c, src/login_nopam.c, src/suauth.c,
Modified: upstream/trunk/libmisc/find_new_gid.c
===================================================================
--- upstream/trunk/libmisc/find_new_gid.c 2008-09-14 12:28:42 UTC (rev 2415)
+++ upstream/trunk/libmisc/find_new_gid.c 2008-09-14 13:42:10 UTC (rev 2416)
@@ -109,7 +109,7 @@
*/
if (group_id == gid_max + 1) {
for (group_id = gid_min; group_id < gid_max; group_id++) {
- if (0 == used_gids[grp->gr_gid]) {
+ if (0 == used_gids[group_id]) {
break;
}
}
Modified: upstream/trunk/libmisc/find_new_uid.c
===================================================================
--- upstream/trunk/libmisc/find_new_uid.c 2008-09-14 12:28:42 UTC (rev 2415)
+++ upstream/trunk/libmisc/find_new_uid.c 2008-09-14 13:42:10 UTC (rev 2416)
@@ -110,7 +110,7 @@
*/
if (user_id == uid_max + 1) {
for (user_id = uid_min; user_id < uid_max; user_id++) {
- if (0 == used_uids[pwd->pw_uid]) {
+ if (0 == used_uids[user_id]) {
break;
}
}
Modified: upstream/trunk/src/pwck.c
===================================================================
--- upstream/trunk/src/pwck.c 2008-09-14 12:28:42 UTC (rev 2415)
+++ upstream/trunk/src/pwck.c 2008-09-14 13:42:10 UTC (rev 2416)
@@ -267,7 +267,7 @@
/*
* Don't be anti-social - unlock the files when you're done.
*/
- if (is_shadow) {
+ 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 ()));
@@ -275,10 +275,12 @@
}
}
spw_locked = false;
- 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 (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 */
+ }
}
pw_locked = false;
}
@@ -403,7 +405,7 @@
* No primary group, just give a warning
*/
- printf (_("user %s: no group %lu\n"),
+ printf (_("user '%s': no group %lu\n"),
pwd->pw_name, (unsigned long) pwd->pw_gid);
*errors += 1;
}
Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c 2008-09-14 12:28:42 UTC (rev 2415)
+++ upstream/trunk/src/useradd.c 2008-09-14 13:42:10 UTC (rev 2416)
@@ -135,6 +135,7 @@
kflg = false, /* specify a directory to fill new user directory */
lflg = false, /* do not add user to lastlog/faillog databases */
mflg = false, /* create user's home directory if it doesn't exist */
+ Mflg = false, /* do not create user's home directory even if CREATE_HOME is set */
Nflg = false, /* do not create a group having the same name as the user, but add the user to def_group (or the group specified with -g) */
oflg = false, /* permit non-unique user ID to be specified with -u */
rflg = false, /* create a system account */
More information about the Pkg-shadow-commits
mailing list