[Pkg-shadow-commits] r2471 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon Dec 22 22:13:24 UTC 2008
Author: nekral-guest
Date: 2008-12-22 22:13:23 +0000 (Mon, 22 Dec 2008)
New Revision: 2471
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/gpasswd.c
Log:
* src/gpasswd.c: Fix the support for usernames with arbitrary
length.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-12-22 22:08:13 UTC (rev 2470)
+++ upstream/trunk/ChangeLog 2008-12-22 22:13:23 UTC (rev 2471)
@@ -1,5 +1,10 @@
2008-12-22 Nicolas François <nicolas.francois at centraliens.net>
+ * src/gpasswd.c: Fix the support for usernames with arbitrary
+ length.
+
+2008-12-22 Nicolas François <nicolas.francois at centraliens.net>
+
* src/groupadd.c, src/groupdel.c, src/groupmod.c: Re-indent.
* src/groupmod.c: Do not add the command synopsis to the main ()
documentation. This avoids outdated information.
Modified: upstream/trunk/src/gpasswd.c
===================================================================
--- upstream/trunk/src/gpasswd.c 2008-12-22 22:08:13 UTC (rev 2470)
+++ upstream/trunk/src/gpasswd.c 2008-12-22 22:13:23 UTC (rev 2471)
@@ -211,14 +211,16 @@
*/
static bool is_valid_user_list (const char *users)
{
- const char *username, *end;
+ char *username, *end;
bool is_valid = true;
+ char *tmpusers = xstrdup (users);
- for (username = users;
+ for (username = tmpusers;
(NULL != username) && ('\0' != *username);
username = end) {
end = strchr (username, ',');
if (NULL != end) {
+ *end = '\0';
end++;
}
@@ -233,6 +235,9 @@
is_valid = false;
}
}
+
+ free (tmpusers);
+
return is_valid;
}
More information about the Pkg-shadow-commits
mailing list