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.
Alex On Tue, 17 Aug 2021 at 05:11, Yi Zhao <yi.z...@windriver.com> 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 > > Signed-off-by: Yi Zhao <yi.z...@windriver.com> > --- > ...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 <yi.z...@windriver.com> > +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 > + > +Upstream-Status: Inappropriate [embedded specific] > + > +Signed-off-by: Yi Zhao <yi.z...@windriver.com> > +--- > + 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} > 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 (#154868): https://lists.openembedded.org/g/openembedded-core/message/154868 Mute This Topic: https://lists.openembedded.org/mt/84940316/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-