diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-19 09:26:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-21 22:51:42 +0100 |
commit | 222cf772685dcf20bc69e3d3899bcfb11bee00c0 (patch) | |
tree | 0a2d975e47297fa33aa4d086f4da6175edbb1abd /meta/recipes-extended | |
parent | c148576562072088f59204d8744b2c841829a31c (diff) | |
download | poky-222cf772685dcf20bc69e3d3899bcfb11bee00c0.tar.gz |
shadow: update 4.11.1 -> 4.12.1
Combine two username relaxing patches into one, rebase, and submit upstream.
(From OE-Core rev: 6f0042be60582669d317b9ff2e1b8034ab2a01d3)
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>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch (renamed from meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch) | 47 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch | 27 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow.inc | 8 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow_4.12.1.bb (renamed from meta/recipes-extended/shadow/shadow_4.11.1.bb) | 0 |
4 files changed, 23 insertions, 59 deletions
diff --git a/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch b/meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch index cc833362e9..6c7abcef1d 100644 --- a/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch +++ b/meta/recipes-extended/shadow/files/0001-shadow-use-relaxed-usernames.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From ca472d6866e545aaa70a70020e3226f236a8aafc Mon Sep 17 00:00:00 2001 | 1 | From b182c52d63bea0f08e1befcec5c3797dd97cdef5 Mon Sep 17 00:00:00 2001 |
2 | From: Shan Hai <shan.hai@windriver.com> | 2 | From: Alexander Kanavin <alex@linutronix.de> |
3 | Date: Tue, 13 Sep 2016 13:45:46 +0800 | 3 | Date: Tue, 16 Aug 2022 13:46:22 +0200 |
4 | Subject: [PATCH] shadow: use relaxed usernames | 4 | Subject: [PATCH] shadow: use relaxed usernames |
5 | 5 | ||
6 | The groupadd from shadow does not allow upper case group names, the | 6 | The groupadd from shadow does not allow upper case group names, the |
@@ -11,21 +11,21 @@ restrictions to allow the upper case group names, and the relaxation is | |||
11 | POSIX compliant because POSIX indicate that usernames are composed of | 11 | POSIX compliant because POSIX indicate that usernames are composed of |
12 | characters from the portable filename character set [A-Za-z0-9._-]. | 12 | characters from the portable filename character set [A-Za-z0-9._-]. |
13 | 13 | ||
14 | Upstream-Status: Pending | 14 | Upstream-Status: Submitted [https://github.com/shadow-maint/shadow/pull/551] |
15 | 15 | ||
16 | Signed-off-by: Shan Hai <shan.hai@windriver.com> | 16 | Signed-off-by: Shan Hai <shan.hai@windriver.com> |
17 | 17 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | |
18 | --- | 18 | --- |
19 | libmisc/chkname.c | 30 ++++++++++++++++++------------ | 19 | libmisc/chkname.c | 29 ++++++++++++++++++----------- |
20 | man/groupadd.8.xml | 6 ------ | 20 | man/groupadd.8.xml | 6 ------ |
21 | man/useradd.8.xml | 8 +------- | 21 | man/useradd.8.xml | 6 ------ |
22 | 3 files changed, 19 insertions(+), 25 deletions(-) | 22 | 3 files changed, 18 insertions(+), 23 deletions(-) |
23 | 23 | ||
24 | diff --git a/libmisc/chkname.c b/libmisc/chkname.c | 24 | diff --git a/libmisc/chkname.c b/libmisc/chkname.c |
25 | index 90f185c..65762b4 100644 | 25 | index cb002a14..c0306c5a 100644 |
26 | --- a/libmisc/chkname.c | 26 | --- a/libmisc/chkname.c |
27 | +++ b/libmisc/chkname.c | 27 | +++ b/libmisc/chkname.c |
28 | @@ -55,22 +55,28 @@ static bool is_valid_name (const char *name) | 28 | @@ -32,21 +32,28 @@ static bool is_valid_name (const char *name) |
29 | } | 29 | } |
30 | 30 | ||
31 | /* | 31 | /* |
@@ -54,7 +54,6 @@ index 90f185c..65762b4 100644 | |||
54 | - ( ('0' <= *name) && ('9' >= *name) ) || | 54 | - ( ('0' <= *name) && ('9' >= *name) ) || |
55 | - ('_' == *name) || | 55 | - ('_' == *name) || |
56 | - ('-' == *name) || | 56 | - ('-' == *name) || |
57 | - ('.' == *name) || | ||
58 | - ( ('$' == *name) && ('\0' == *(name + 1)) ) | 57 | - ( ('$' == *name) && ('\0' == *(name + 1)) ) |
59 | - )) { | 58 | - )) { |
60 | + if (!( (*name >= 'a' && *name <= 'z') || | 59 | + if (!( (*name >= 'a' && *name <= 'z') || |
@@ -67,13 +66,13 @@ index 90f185c..65762b4 100644 | |||
67 | } | 66 | } |
68 | } | 67 | } |
69 | diff --git a/man/groupadd.8.xml b/man/groupadd.8.xml | 68 | diff --git a/man/groupadd.8.xml b/man/groupadd.8.xml |
70 | index 1e58f09..d804b61 100644 | 69 | index 26671f92..3eacaa09 100644 |
71 | --- a/man/groupadd.8.xml | 70 | --- a/man/groupadd.8.xml |
72 | +++ b/man/groupadd.8.xml | 71 | +++ b/man/groupadd.8.xml |
73 | @@ -272,12 +272,6 @@ | 72 | @@ -63,12 +63,6 @@ |
74 | 73 | values from the system. The new group will be entered into the system | |
75 | <refsect1 id='caveats'> | 74 | files as needed. |
76 | <title>CAVEATS</title> | 75 | </para> |
77 | - <para> | 76 | - <para> |
78 | - Groupnames must start with a lower case letter or an underscore, | 77 | - Groupnames must start with a lower case letter or an underscore, |
79 | - followed by lower case letters, digits, underscores, or dashes. | 78 | - followed by lower case letters, digits, underscores, or dashes. |
@@ -84,19 +83,10 @@ index 1e58f09..d804b61 100644 | |||
84 | Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. | 83 | Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long. |
85 | </para> | 84 | </para> |
86 | diff --git a/man/useradd.8.xml b/man/useradd.8.xml | 85 | diff --git a/man/useradd.8.xml b/man/useradd.8.xml |
87 | index a16d730..c0bd777 100644 | 86 | index c7f95b47..e056d141 100644 |
88 | --- a/man/useradd.8.xml | 87 | --- a/man/useradd.8.xml |
89 | +++ b/man/useradd.8.xml | 88 | +++ b/man/useradd.8.xml |
90 | @@ -366,7 +366,7 @@ | 89 | @@ -691,12 +691,6 @@ |
91 | </term> | ||
92 | <listitem> | ||
93 | <para> | ||
94 | - Do no create the user's home directory, even if the system | ||
95 | + Do not create the user's home directory, even if the system | ||
96 | wide setting from <filename>/etc/login.defs</filename> | ||
97 | (<option>CREATE_HOME</option>) is set to | ||
98 | <replaceable>yes</replaceable>. | ||
99 | @@ -660,12 +660,6 @@ | ||
100 | the user account creation request. | 90 | the user account creation request. |
101 | </para> | 91 | </para> |
102 | 92 | ||
@@ -109,3 +99,6 @@ index a16d730..c0bd777 100644 | |||
109 | <para> | 99 | <para> |
110 | Usernames may only be up to 32 characters long. | 100 | Usernames may only be up to 32 characters long. |
111 | </para> | 101 | </para> |
102 | -- | ||
103 | 2.30.2 | ||
104 | |||
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch deleted file mode 100644 index a7bb0a9290..0000000000 --- a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | # commit message copied from openembedded: | ||
2 | # commit 246c80637b135f3a113d319b163422f98174ee6c | ||
3 | # Author: Khem Raj <raj.khem@gmail.com> | ||
4 | # Date: Wed Jun 9 13:37:03 2010 -0700 | ||
5 | # | ||
6 | # shadow-4.1.4.2: Add patches to support dots in login id. | ||
7 | # | ||
8 | # Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | # | ||
10 | # comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
15 | |||
16 | Index: shadow-4.1.4.2/libmisc/chkname.c | ||
17 | =================================================================== | ||
18 | --- shadow-4.1.4.2.orig/libmisc/chkname.c 2009-04-28 12:14:04.000000000 -0700 | ||
19 | +++ shadow-4.1.4.2/libmisc/chkname.c 2010-06-03 17:43:20.638973857 -0700 | ||
20 | @@ -61,6 +61,7 @@ static bool is_valid_name (const char *n | ||
21 | ( ('0' <= *name) && ('9' >= *name) ) || | ||
22 | ('_' == *name) || | ||
23 | ('-' == *name) || | ||
24 | + ('.' == *name) || | ||
25 | ( ('$' == *name) && ('\0' == *(name + 1)) ) | ||
26 | )) { | ||
27 | return false; | ||
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index f5fdf436f7..fbb1d395ff 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
@@ -11,10 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c9a450b7be84eac23e6353efecb60b5b \ | |||
11 | DEPENDS = "virtual/crypt" | 11 | DEPENDS = "virtual/crypt" |
12 | 12 | ||
13 | UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" | 13 | UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" |
14 | SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}.tar.gz \ | 14 | SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \ |
15 | file://shadow-4.1.3-dots-in-usernames.patch \ | 15 | file://0001-shadow-use-relaxed-usernames.patch \ |
16 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ | 16 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ |
17 | file://shadow-relaxed-usernames.patch \ | ||
18 | file://useradd \ | 17 | file://useradd \ |
19 | " | 18 | " |
20 | 19 | ||
@@ -30,8 +29,7 @@ SRC_URI:append:class-native = " \ | |||
30 | SRC_URI:append:class-nativesdk = " \ | 29 | SRC_URI:append:class-nativesdk = " \ |
31 | file://0001-Disable-use-of-syslog-for-sysroot.patch \ | 30 | file://0001-Disable-use-of-syslog-for-sysroot.patch \ |
32 | " | 31 | " |
33 | 32 | SRC_URI[sha256sum] = "9fdb73b5d2b44e8ba9fcee1b4493ac75dd5040bda35b9ac8b06570cd192e7ee3" | |
34 | SRC_URI[sha256sum] = "f262089be6a1011d50ec7849e14571b7b2e788334368f3dccb718513f17935ed" | ||
35 | 33 | ||
36 | # Additional Policy files for PAM | 34 | # Additional Policy files for PAM |
37 | PAM_SRC_URI = "file://pam.d/chfn \ | 35 | PAM_SRC_URI = "file://pam.d/chfn \ |
diff --git a/meta/recipes-extended/shadow/shadow_4.11.1.bb b/meta/recipes-extended/shadow/shadow_4.12.1.bb index 40b11345c9..40b11345c9 100644 --- a/meta/recipes-extended/shadow/shadow_4.11.1.bb +++ b/meta/recipes-extended/shadow/shadow_4.12.1.bb | |||