[Pkg-shadow-commits] r1432 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Wed Nov 21 21:27:44 UTC 2007
Author: nekral-guest
Date: 2007-11-21 21:27:44 +0000 (Wed, 21 Nov 2007)
New Revision: 1432
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/newusers.c
Log:
* Try harder to get the GID equal to the UID.
This was not the case when the GID is not specified, and a GID
exist with an ID higher than the all the UIDs.
* Typo in comment: contrained -> constrained.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-11-21 20:28:13 UTC (rev 1431)
+++ upstream/trunk/ChangeLog 2007-11-21 21:27:44 UTC (rev 1432)
@@ -1,3 +1,10 @@
+2007-11-21 Nicolas François <nicolas.francois at centraliens.net>
+
+ * src/newusers.c: Try harder to get the GID equal to the UID.
+ This was not the case when the GID is not specified, and a GID
+ exist with an ID higher than the all the UIDs.
+ * src/newusers.c: Typo in comment: contrained -> constrained.
+
2007-11-20 Nicolas François <nicolas.francois at centraliens.net>
* src/chgpasswd.c: If the shadow group file is not present, do not
Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c 2007-11-21 20:28:13 UTC (rev 1431)
+++ upstream/trunk/src/newusers.c 2007-11-21 21:27:44 UTC (rev 1432)
@@ -189,7 +189,9 @@
} else if (uid[0] && (pwd = pw_locate (uid))) {
i = pwd->pw_uid;
} else {
- i = 100;
+ /* Start with gid, either the specified GID, or an ID
+ * greater than all the group and user IDs */
+ i = gid;
for (pw_rewind (); (pwd = pw_next ());)
if (pwd->pw_uid >= i)
i = pwd->pw_uid + 1;
@@ -378,7 +380,7 @@
/*
* Read each line. The line has the same format as a password file
- * entry, except that certain fields are not contrained to be
+ * entry, except that certain fields are not constrained to be
* numerical values. If a group ID is entered which does not already
* exist, an attempt is made to allocate the same group ID as the
* numerical user ID. Should that fail, the next available group ID
More information about the Pkg-shadow-commits
mailing list