From e3549c3f90e8e68d50e9277bb6ff3344b52785cc Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Thu, 13 Jun 2024 04:21:01 +0200 Subject: [PATCH] Rebase patch 506_relaxed_usernames --- ..._usernames => 506_relaxed_usernames.patch} | 30 +++++++++++-------- debian/patches/series | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) rename debian/patches/{506_relaxed_usernames => 506_relaxed_usernames.patch} (82%) diff --git a/debian/patches/506_relaxed_usernames b/debian/patches/506_relaxed_usernames.patch similarity index 82% rename from debian/patches/506_relaxed_usernames rename to debian/patches/506_relaxed_usernames.patch index 0e066d91..bd9300dd 100644 --- a/debian/patches/506_relaxed_usernames +++ b/debian/patches/506_relaxed_usernames.patch @@ -15,14 +15,16 @@ Details: than '-' as the leading character). Thus, the maintenance tools don't anymore. closes: #79682, #166798, #171179 ---- a/libmisc/chkname.c -+++ b/libmisc/chkname.c -@@ -32,44 +32,26 @@ +Index: shadow/lib/chkname.c +=================================================================== +--- shadow.orig/lib/chkname.c ++++ shadow/lib/chkname.c +@@ -32,44 +32,27 @@ static bool is_valid_name (const char *n } /* -- * User/group names must match gnu e-regex: -- * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]? +- * User/group names must match BRE regex: +- * [a-zA-Z0-9_.][a-zA-Z0-9_.-]*$\? - * - * as a non-POSIX, extension, allow "$" as the last char for - * sake of Samba 3.x "add machine script" @@ -51,7 +53,7 @@ Details: + || ('+' == *name)) { return false; } -- + - numeric = isdigit(*name); - - while ('\0' != *++name) { @@ -76,10 +78,12 @@ Details: + return true; } - bool is_valid_user_name (const char *name) ---- a/man/useradd.8.xml -+++ b/man/useradd.8.xml -@@ -708,6 +708,14 @@ + +Index: shadow/man/useradd.8.xml +=================================================================== +--- shadow.orig/man/useradd.8.xml ++++ shadow/man/useradd.8.xml +@@ -733,6 +733,14 @@ the ls output. @@ -94,8 +98,10 @@ Details: Usernames may only be up to 32 characters long. ---- a/man/groupadd.8.xml -+++ b/man/groupadd.8.xml +Index: shadow/man/groupadd.8.xml +=================================================================== +--- shadow.orig/man/groupadd.8.xml ++++ shadow/man/groupadd.8.xml @@ -72,6 +72,12 @@ also disallowed. diff --git a/debian/patches/series b/debian/patches/series index 28311bf5..0d641b71 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,5 +10,5 @@ 502_debian_useradd_defaults.patch 503_shadowconfig.8 505_useradd_recommend_adduser -506_relaxed_usernames +506_relaxed_usernames.patch 542_useradd-O_option