summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/shadow/files/shadow-4.0.13-dots-in-usernames.patch')
-rw-r--r--sys-apps/shadow/files/shadow-4.0.13-dots-in-usernames.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/shadow-4.0.13-dots-in-usernames.patch b/sys-apps/shadow/files/shadow-4.0.13-dots-in-usernames.patch
new file mode 100644
index 000000000000..54e1d72e61b3
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.0.13-dots-in-usernames.patch
@@ -0,0 +1,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;
+ }