+2007-11-21 Nicolas François <nicolas.francois@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@centraliens.net>
* src/chgpasswd.c: If the shadow group file is not present, do not
} 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;
/*
* 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