On 8/17/21 2:59 PM, Alexander Kanavin wrote:
If the issue is that /etc/default/useradd was deleted, shouldn't we
address this by reinstating that file? Patching the source code does
not seem like a better solution, and introduces surprising behaviour
for those expecting upstream defaults rather than Yocto's.
Thanks. That's reasonable. I will send V2.
//Yi
Alex
On Tue, 17 Aug 2021 at 05:11, Yi Zhao <[email protected]
<mailto:[email protected]>> wrote:
The shadow 4.9 stops shiping /etc/default/useradd[1] and uses built-in
settings by default. Some settings are not consistent with previous
shadow 4.8.1 in oe-core. Per shadow 4.8.1 settings, change the default
shell to /bin/sh and stop creating mail spool.
[1]
https://github.com/shadow-maint/shadow/commit/bbf4b79bc49fd1826eb41f6629669ef0b647267b
<https://urldefense.com/v3/__https://github.com/shadow-maint/shadow/commit/bbf4b79bc49fd1826eb41f6629669ef0b647267b__;!!AjveYdw8EvQ!Kk3VAv9WZwGA3kQvHueZFUH7P9syGlPpKSUrJFOeT58lU68Bf5fcNuv3yIPf9hGQng$>
Signed-off-by: Yi Zhao <[email protected]
<mailto:[email protected]>>
---
...0001-useradd-update-default-settings.patch | 38
+++++++++++++++++++
meta/recipes-extended/shadow/shadow.inc | 1 +
2 files changed, 39 insertions(+)
create mode 100644
meta/recipes-extended/shadow/files/0001-useradd-update-default-settings.patch
diff --git
a/meta/recipes-extended/shadow/files/0001-useradd-update-default-settings.patch
b/meta/recipes-extended/shadow/files/0001-useradd-update-default-settings.patch
new file mode 100644
index 0000000000..1e6702019b
--- /dev/null
+++
b/meta/recipes-extended/shadow/files/0001-useradd-update-default-settings.patch
@@ -0,0 +1,38 @@
+From 46106ec16409ea99f73a8a8823e50ac54db8e122 Mon Sep 17 00:00:00
2001
+From: Yi Zhao <[email protected] <mailto:[email protected]>>
+Date: Tue, 17 Aug 2021 10:11:27 +0800
+Subject: [PATCH] useradd: update default settings
+
+The shadow 4.9 stops shiping /etc/default/useradd[1] and uses
built-in
+settings by default. Some settings are not consistent with previous
+shadow 4.8.1 in oe-core. Per shadow 4.8.1 settings, change the
default
+shell to /bin/sh and stop creating mail spool.
+
+[1]
https://github.com/shadow-maint/shadow/commit/bbf4b79bc49fd1826eb41f6629669ef0b647267b
<https://urldefense.com/v3/__https://github.com/shadow-maint/shadow/commit/bbf4b79bc49fd1826eb41f6629669ef0b647267b__;!!AjveYdw8EvQ!Kk3VAv9WZwGA3kQvHueZFUH7P9syGlPpKSUrJFOeT58lU68Bf5fcNuv3yIPf9hGQng$>
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <[email protected]
<mailto:[email protected]>>
+---
+ src/useradd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index 0d3f390d..715351b4 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -104,9 +104,9 @@ FILE *shadow_logfd = NULL;
+ static gid_t def_group = 1000;
+ static const char *def_gname = "other";
+ static const char *def_home = "/home";
+-static const char *def_shell = "/bin/bash";
++static const char *def_shell = "/bin/sh";
+ static const char *def_template = SKEL_DIR;
+-static const char *def_create_mail_spool = "yes";
++static const char *def_create_mail_spool = "no";
+
+ static long def_inactive = -1;
+ static const char *def_expire = "";
+--
+2.25.1
+
diff --git a/meta/recipes-extended/shadow/shadow.inc
b/meta/recipes-extended/shadow/shadow.inc
index 97ffae978a..e2a7a5bac6 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -16,6 +16,7 @@ SRC_URI =
"https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}
<https://urldefense.com/v3/__https://github.com/shadow-maint/shadow/releases/download/v$*7BPV*7D/$*7BBP*7D__;JSUlJQ!!AjveYdw8EvQ!Kk3VAv9WZwGA3kQvHueZFUH7P9syGlPpKSUrJFOeT58lU68Bf5fcNuv3yIMldpXy0w$>
file://shadow-relaxed-usernames.patch \
file://0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch
\
file://0001-libsubid-link-to-PAM-libraries.patch \
+ file://0001-useradd-update-default-settings.patch \
"
SRC_URI:append:class-target = " \
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154870):
https://lists.openembedded.org/g/openembedded-core/message/154870
Mute This Topic: https://lists.openembedded.org/mt/84940316/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-