From 22c8043c96f1241ac43dcbe17233546b63c83266 Mon Sep 17 00:00:00 2001 From: guoxiaoqi Date: Thu, 6 Feb 2020 11:25:42 +0800 Subject: [PATCH] user name can start with an upper case letter --- shadow-4.5-goodname.patch | 28 +++++++++++++++++++--------- shadow.spec | 6 +++++- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/shadow-4.5-goodname.patch b/shadow-4.5-goodname.patch index 215f658..b107e3f 100644 --- a/shadow-4.5-goodname.patch +++ b/shadow-4.5-goodname.patch @@ -64,7 +64,7 @@ Index: shadow-4.5/man/groupadd.8.xml =================================================================== --- shadow-4.5.orig/man/groupadd.8.xml +++ shadow-4.5/man/groupadd.8.xml -@@ -256,12 +256,6 @@ +@@ -256,10 +256,12 @@ CAVEATS @@ -72,16 +72,20 @@ Index: shadow-4.5/man/groupadd.8.xml - 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_-]*[$]? -- -- - Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. ++ Groupnames may contain only lower and upper case letters, digits, ++ underscores, or dashes. They can end with a dollar sign. ++ ++ Dashes are not allowed at the beginning of the groupname. ++ Fully numeric groupnames and groupnames . or .. are ++ also disallowed. + Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. Index: shadow-4.5/man/useradd.8.xml =================================================================== --- shadow-4.5.orig/man/useradd.8.xml +++ shadow-4.5/man/useradd.8.xml -@@ -633,12 +633,6 @@ +@@ -633,10 +633,14 @@ @@ -89,8 +93,14 @@ Index: shadow-4.5/man/useradd.8.xml - 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_-]*[$]? -- -- - Usernames may only be up to 32 characters long. ++ Usernames may contain only lower and upper case letters, digits, ++ underscores, or dashes. They can end with a dollar sign. ++ ++ Dashes are not allowed at the beginning of the username. ++ Fully numeric usernames and usernames . or .. are ++ also disallowed. It is not recommended to use usernames beginning ++ with . character as their home directories will be hidden in ++ the ls output. - + + Usernames may only be up to 32 characters long. diff --git a/shadow.spec b/shadow.spec index dc5615b..506ca38 100644 --- a/shadow.spec +++ b/shadow.spec @@ -1,6 +1,6 @@ Name: shadow Version: 4.7 -Release: 5 +Release: 6 Epoch: 2 License: BSD and GPLv2+ Summary: Tools for managing accounts and shadow password files @@ -13,6 +13,7 @@ Source4: shadow-bsd.txt Source5: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # fix unknown item 'LASTLOG_MAX_UID' Patch1: usermod.c-Fix-invalid-variable-name.patch +Patch2: shadow-4.5-goodname.patch Patch9000: shadow-4.1.5.1-var-lock.patch Patch9001: shadow-utils-fix-lock-file-residue.patch Patch9002: shadow-utils-fix-invalid-path.patch @@ -164,6 +165,9 @@ done %{_mandir}/*/* %changelog +* Thu Feb 16 2020 openEuler Buildteam - 2:4.7-6 +- User name can start with an upper case letter + * Thu Jan 16 2020 openEuler Buildteam - 2:4.7-5 - Fix unknown item 'LASTLOG_MAX_UID' -- Gitee