summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-11-20 14:31:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-22 12:26:46 +0000
commit985735386e0d979e6e20225b9b9c29f04a5aaa46 (patch)
tree497270c21ffd6a412d46750a73dc48ad48b5a9c2
parent4f84a13a02a4c0f888533d05e7135ca1ec79a329 (diff)
downloadpoky-985735386e0d979e6e20225b9b9c29f04a5aaa46.tar.gz
shadow: update 4.12.3 -> 4.13
Drop 0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch (issue fixed upstream) 0001-shadow-use-relaxed-usernames.patch (merged upstream) (From OE-Core rev: 03917700e4bba2c979e055b5f0939f14ebe09525) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch6
-rw-r--r--meta/recipes-extended/shadow/files/0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch27
-rw-r--r--meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch104
-rw-r--r--meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch6
-rw-r--r--meta/recipes-extended/shadow/shadow.inc4
-rw-r--r--meta/recipes-extended/shadow/shadow_4.13.bb (renamed from meta/recipes-extended/shadow/shadow_4.12.3.bb)0
6 files changed, 7 insertions, 140 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
index 628db42136..fa1532c831 100644
--- a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
+++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -1,4 +1,4 @@
1From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001 1From 85d0444229ee3d14fefcf10d093f49c862826f82 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 14 Apr 2022 23:11:53 +0000 3Date: Thu, 14 Apr 2022 23:11:53 +0000
4Subject: [PATCH] Disable use of syslog for shadow-native tools 4Subject: [PATCH] Disable use of syslog for shadow-native tools
@@ -17,10 +17,10 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
17 2 files changed, 3 insertions(+), 2 deletions(-) 17 2 files changed, 3 insertions(+), 2 deletions(-)
18 18
19diff --git a/configure.ac b/configure.ac 19diff --git a/configure.ac b/configure.ac
20index 5dcae19..b2c58f5 100644 20index 924254a..603af81 100644
21--- a/configure.ac 21--- a/configure.ac
22+++ b/configure.ac 22+++ b/configure.ac
23@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd", 23@@ -191,7 +191,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
24 [Path to passwd program.]) 24 [Path to passwd program.])
25 25
26 dnl XXX - quick hack, should disappear before anyone notices :). 26 dnl XXX - quick hack, should disappear before anyone notices :).
diff --git a/meta/recipes-extended/shadow/files/0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch b/meta/recipes-extended/shadow/files/0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch
deleted file mode 100644
index 21c9a1415c..0000000000
--- a/meta/recipes-extended/shadow/files/0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 11290e897a49adddee215833944a518443d9b0d6 Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei.gherzan@huawei.com>
3Date: Wed, 24 Aug 2022 00:54:47 +0200
4Subject: [PATCH] Drop nsswitch.conf message when not in place - eg. musl
5
6Upstream-Status: Inappropriate [issue reported at https://github.com/shadow-maint/shadow/issues/557]
7Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
8---
9 lib/nss.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/lib/nss.c b/lib/nss.c
13index 06fa48e..44245da 100644
14--- a/lib/nss.c
15+++ b/lib/nss.c
16@@ -59,7 +59,7 @@ void nss_init(const char *nsswitch_path) {
17 // subid: files
18 nssfp = fopen(nsswitch_path, "r");
19 if (!nssfp) {
20- fprintf(shadow_logfd, "Failed opening %s: %m\n", nsswitch_path);
21+ //fprintf(shadow_logfd, "Failed opening %s: %m\n", nsswitch_path);
22 atomic_store(&nss_init_completed, true);
23 return;
24 }
25--
262.25.1
27
diff --git a/meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch b/meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch
deleted file mode 100644
index 6c7abcef1d..0000000000
--- a/meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch
+++ /dev/null
@@ -1,104 +0,0 @@
1From b182c52d63bea0f08e1befcec5c3797dd97cdef5 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 16 Aug 2022 13:46:22 +0200
4Subject: [PATCH] shadow: use relaxed usernames
5
6The groupadd from shadow does not allow upper case group names, the
7same is true for the upstream shadow. But distributions like
8Debian/Ubuntu/CentOS has their own way to cope with this problem,
9this patch is picked up from CentOS release 7.0 to relax the usernames
10restrictions to allow the upper case group names, and the relaxation is
11POSIX compliant because POSIX indicate that usernames are composed of
12characters from the portable filename character set [A-Za-z0-9._-].
13
14Upstream-Status: Submitted [https://github.com/shadow-maint/shadow/pull/551]
15
16Signed-off-by: Shan Hai <shan.hai@windriver.com>
17Signed-off-by: Alexander Kanavin <alex@linutronix.de>
18---
19 libmisc/chkname.c | 29 ++++++++++++++++++-----------
20 man/groupadd.8.xml | 6 ------
21 man/useradd.8.xml | 6 ------
22 3 files changed, 18 insertions(+), 23 deletions(-)
23
24diff --git a/libmisc/chkname.c b/libmisc/chkname.c
25index cb002a14..c0306c5a 100644
26--- a/libmisc/chkname.c
27+++ b/libmisc/chkname.c
28@@ -32,21 +32,28 @@ static bool is_valid_name (const char *name)
29 }
30
31 /*
32- * User/group names must match [a-z_][a-z0-9_-]*[$]
33- */
34-
35- if (('\0' == *name) ||
36- !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
37+ * User/group names must match gnu e-regex:
38+ * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
39+ *
40+ * as a non-POSIX, extension, allow "$" as the last char for
41+ * sake of Samba 3.x "add machine script"
42+ */
43+ if ( ('\0' == *name) ||
44+ !((*name >= 'a' && *name <= 'z') ||
45+ (*name >= 'A' && *name <= 'Z') ||
46+ (*name >= '0' && *name <= '9') ||
47+ (*name == '_') || (*name == '.')
48+ )) {
49 return false;
50 }
51
52 while ('\0' != *++name) {
53- if (!(( ('a' <= *name) && ('z' >= *name) ) ||
54- ( ('0' <= *name) && ('9' >= *name) ) ||
55- ('_' == *name) ||
56- ('-' == *name) ||
57- ( ('$' == *name) && ('\0' == *(name + 1)) )
58- )) {
59+ if (!( (*name >= 'a' && *name <= 'z') ||
60+ (*name >= 'A' && *name <= 'Z') ||
61+ (*name >= '0' && *name <= '9') ||
62+ (*name == '_') || (*name == '.') || (*name == '-') ||
63+ (*name == '$' && *(name + 1) == '\0')
64+ )) {
65 return false;
66 }
67 }
68diff --git a/man/groupadd.8.xml b/man/groupadd.8.xml
69index 26671f92..3eacaa09 100644
70--- a/man/groupadd.8.xml
71+++ b/man/groupadd.8.xml
72@@ -63,12 +63,6 @@
73 values from the system. The new group will be entered into the system
74 files as needed.
75 </para>
76- <para>
77- Groupnames must start with a lower case letter or an underscore,
78- followed by lower case letters, digits, underscores, or dashes.
79- They can end with a dollar sign.
80- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
81- </para>
82 <para>
83 Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
84 </para>
85diff --git a/man/useradd.8.xml b/man/useradd.8.xml
86index c7f95b47..e056d141 100644
87--- a/man/useradd.8.xml
88+++ b/man/useradd.8.xml
89@@ -691,12 +691,6 @@
90 the user account creation request.
91 </para>
92
93- <para>
94- Usernames must start with a lower case letter or an underscore,
95- followed by lower case letters, digits, underscores, or dashes.
96- They can end with a dollar sign.
97- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
98- </para>
99 <para>
100 Usernames may only be up to 32 characters long.
101 </para>
102--
1032.30.2
104
diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
index 173e8a937d..85d9175105 100644
--- a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
+++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -1,4 +1,4 @@
1From d767f776e631f1493fd7b266f2026d630ecf70fe Mon Sep 17 00:00:00 2001 1From 21583da072aa66901d859ac00ce209bac87ddecc Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 17 Jul 2014 15:53:34 +0800 3Date: Thu, 17 Jul 2014 15:53:34 +0800
4Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env 4Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env
@@ -21,10 +21,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
21 1 file changed, 12 insertions(+), 4 deletions(-) 21 1 file changed, 12 insertions(+), 4 deletions(-)
22 22
23diff --git a/lib/commonio.c b/lib/commonio.c 23diff --git a/lib/commonio.c b/lib/commonio.c
24index 9e0fde6..7c3a1da 100644 24index 9a02ce1..61384ec 100644
25--- a/lib/commonio.c 25--- a/lib/commonio.c
26+++ b/lib/commonio.c 26+++ b/lib/commonio.c
27@@ -624,10 +624,18 @@ int commonio_open (struct commonio_db *db, int mode) 27@@ -616,10 +616,18 @@ int commonio_open (struct commonio_db *db, int mode)
28 db->cursor = NULL; 28 db->cursor = NULL;
29 db->changed = false; 29 db->changed = false;
30 30
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 5656a375b7..2c70a2d00e 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -12,7 +12,6 @@ DEPENDS = "virtual/crypt"
12 12
13GITHUB_BASE_URI = "https://github.com/shadow-maint/shadow/releases" 13GITHUB_BASE_URI = "https://github.com/shadow-maint/shadow/releases"
14SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \ 14SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \
15 file://0001-shadow-use-relaxed-usernames.patch \
16 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ 15 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
17 file://useradd \ 16 file://useradd \
18 " 17 "
@@ -25,12 +24,11 @@ SRC_URI:append:class-target = " \
25SRC_URI:append:class-native = " \ 24SRC_URI:append:class-native = " \
26 file://0001-Disable-use-of-syslog-for-sysroot.patch \ 25 file://0001-Disable-use-of-syslog-for-sysroot.patch \
27 file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ 26 file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
28 file://0001-Drop-nsswitch.conf-message-when-not-in-place-eg.-musl.patch \
29 " 27 "
30SRC_URI:append:class-nativesdk = " \ 28SRC_URI:append:class-nativesdk = " \
31 file://0001-Disable-use-of-syslog-for-sysroot.patch \ 29 file://0001-Disable-use-of-syslog-for-sysroot.patch \
32 " 30 "
33SRC_URI[sha256sum] = "f525154adc5605e4ebf03d3e7ee8be4d7f3c7cf9df2c2244043406b6eefca2da" 31SRC_URI[sha256sum] = "813057047499c7fe81108adcf0cffa3ad4ec75e19a80151f9cbaa458ff2e86cd"
34 32
35 33
36# Additional Policy files for PAM 34# Additional Policy files for PAM
diff --git a/meta/recipes-extended/shadow/shadow_4.12.3.bb b/meta/recipes-extended/shadow/shadow_4.13.bb
index 40b11345c9..40b11345c9 100644
--- a/meta/recipes-extended/shadow/shadow_4.12.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.13.bb