1 diff -up shadow-4.1.5.1/libmisc/chkname.c.goodname shadow-4.1.5.1/libmisc/chkname.c
2 --- shadow-4.1.5.1/libmisc/chkname.c.goodname 2009-07-13 00:24:45.000000000 +0200
3 +++ shadow-4.1.5.1/libmisc/chkname.c 2012-09-19 18:43:53.492160653 +0200
5 static bool is_valid_name (const char *name)
8 - * User/group names must match [a-z_][a-z0-9_-]*[$]
10 - if (('\0' == *name) ||
11 - !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
12 + * User/group names must match gnu e-regex:
13 + * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
15 + * as a non-POSIX, extension, allow "$" as the last char for
16 + * sake of Samba 3.x "add machine script"
18 + if ( ('\0' == *name) ||
19 + !((*name >= 'a' && *name <= 'z') ||
20 + (*name >= 'A' && *name <= 'Z') ||
21 + (*name >= '0' && *name <= '9') ||
22 + (*name == '_') || (*name == '.')
27 while ('\0' != *++name) {
28 - if (!(( ('a' <= *name) && ('z' >= *name) ) ||
29 - ( ('0' <= *name) && ('9' >= *name) ) ||
32 - ( ('$' == *name) && ('\0' == *(name + 1)) )
34 + if (!( (*name >= 'a' && *name <= 'z') ||
35 + (*name >= 'A' && *name <= 'Z') ||
36 + (*name >= '0' && *name <= '9') ||
37 + (*name == '_') || (*name == '.') || (*name == '-') ||
38 + (*name == '$' && *(name + 1) == '\0')
43 diff -up shadow-4.1.5.1/man/groupadd.8.xml.goodname shadow-4.1.5.1/man/groupadd.8.xml
44 --- shadow-4.1.5.1/man/groupadd.8.xml.goodname 2012-05-25 13:45:27.000000000 +0200
45 +++ shadow-4.1.5.1/man/groupadd.8.xml 2012-09-19 18:43:53.492160653 +0200
47 <refsect1 id='caveats'>
48 <title>CAVEATS</title>
50 - Groupnames must start with a lower case letter or an underscore,
51 - followed by lower case letters, digits, underscores, or dashes.
52 - They can end with a dollar sign.
53 - In regular expression terms: [a-z_][a-z0-9_-]*[$]?
56 Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
59 diff -up shadow-4.1.5.1/man/man8/groupadd.8.goodname shadow-4.1.5.1/man/man8/groupadd.8
60 --- shadow-4.1.5.1/man/man8/groupadd.8.goodname 2012-05-25 13:58:40.000000000 +0200
61 +++ shadow-4.1.5.1/man/man8/groupadd.8 2012-09-19 18:44:42.175123079 +0200
62 @@ -190,9 +190,7 @@ Shadow password suite configuration\&.
66 -Groupnames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
68 -Groupnames may only be up to 16 characters long\&.
69 +Groupnames may only be up to 32 characters long\&.
71 You may not add a NIS or LDAP group\&. This must be performed on the corresponding server\&.
73 diff -up shadow-4.1.5.1/man/man8/useradd.8.goodname shadow-4.1.5.1/man/man8/useradd.8
74 --- shadow-4.1.5.1/man/man8/useradd.8.goodname 2012-05-25 13:59:28.000000000 +0200
75 +++ shadow-4.1.5.1/man/man8/useradd.8 2012-09-19 18:46:09.249033949 +0200
76 @@ -224,7 +224,7 @@ is not enabled, no home directories are
80 -Do no create the user\*(Aqs home directory, even if the system wide setting from
81 +Do not create the user\*(Aqs home directory, even if the system wide setting from
83 (\fBCREATE_HOME\fR) is set to
85 @@ -430,8 +430,6 @@ Similarly, if the username already exist
87 will deny the user account creation request\&.
89 -Usernames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
91 Usernames may only be up to 32 characters long\&.
94 diff -up shadow-4.1.5.1/man/useradd.8.xml.goodname shadow-4.1.5.1/man/useradd.8.xml
95 --- shadow-4.1.5.1/man/useradd.8.xml.goodname 2012-05-25 13:45:29.000000000 +0200
96 +++ shadow-4.1.5.1/man/useradd.8.xml 2012-09-19 18:43:53.493160675 +0200
101 - Do no create the user's home directory, even if the system
102 + Do not create the user's home directory, even if the system
103 wide setting from <filename>/etc/login.defs</filename>
104 (<option>CREATE_HOME</option>) is set to
105 <replaceable>yes</replaceable>.
110 - Usernames must start with a lower case letter or an underscore,
111 - followed by lower case letters, digits, underscores, or dashes.
112 - They can end with a dollar sign.
113 - In regular expression terms: [a-z_][a-z0-9_-]*[$]?
116 Usernames may only be up to 32 characters long.