If anyone wants to use capital letters or '.' for group or users names, here's a patch for the current version of shadow in SVN-x86_64-Multilib. Couldn't figure out how to change the man page though.

Dan
Submitted by Dan McGhee
Date: 2009 October 5
Initial package version: 4.1.4.2
Original patch: shadow-4.1.2.2 by Jim Gifford
Description:  Adds capital letters and '.' to group and user names

--- shadow-4.1.4.2/libmisc/chkname.c.orig	2009-04-28 14:14:04.000000000 -0500
+++ shadow-4.1.4.2/libmisc/chkname.c	2009-10-05 15:35:24.000000000 -0500
@@ -49,17 +49,22 @@
 static bool is_valid_name (const char *name)
 {
 	/*
-	 * User/group names must match [a-z_][a-z0-9_-]*[$]
+	 * User/group names must match [a-zA-Z0-9_.][a-zA-Z0-9_.-]*[$]
 	 */
 	if (('\0' == *name) ||
-	    !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
+	    !((('a' <= *name) && ('z' >= *name) ||
+	    ('A' <= *name) && ('Z' >= *name) || 
+	    ('0' <= *name) && ('9'>= *name) ||
+	    ('_' == *name || '.' == *name)))) {
 		return false;
 	}
 
 	while ('\0' != *++name) {
 		if (!(( ('a' <= *name) && ('z' >= *name) ) ||
+		      ( ('A' <= *name) && ('Z' >= *name) ) ||
 		      ( ('0' <= *name) && ('9' >= *name) ) ||
 		      ('_' == *name) ||
+		      ('.' == *name) ||
 		      ('-' == *name) ||
 		      ( ('$' == *name) && ('\0' == *(name + 1)) )
 		     )) {
_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org

Reply via email to