summaryrefslogtreecommitdiff
blob: 54e1d72e61b311a8a81c83619d803ac1836fe45a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Allow people to add users with dots in their names.

http://bugs.gentoo.org/22920

Index: libmisc/chkname.c
===================================================================
RCS file: /cvsroot/shadow/libmisc/chkname.c,v
retrieving revision 1.11
diff -u -p -r1.11 chkname.c
--- libmisc/chkname.c	31 Aug 2005 17:24:57 -0000	1.11
+++ libmisc/chkname.c	10 Oct 2005 22:20:16 -0000
@@ -18,7 +18,7 @@
 static int good_name (const char *name)
 {
 	/*
-	 * User/group names must match [a-z_][a-z0-9_-]*[$]
+	 * User/group names must match [a-z_][a-z0-9_-.]*[$]
 	 */
 	if (!*name || !((*name >= 'a' && *name <= 'z') || *name == '_'))
 		return 0;
@@ -27,6 +27,7 @@ static int good_name (const char *name)
 		if (!((*name >= 'a' && *name <= 'z') ||
 		      (*name >= '0' && *name <= '9') ||
 		      *name == '_' || *name == '-' ||
+		      *name == '.' ||
 		      (*name == '$' && *(name + 1) == '\0')))
 			return 0;
 	}