shadow: upgrade from 4.1.4.3 to 4.2.1
v4 cover shadow: upgrade from 4.1.4.3 to 4.2.1
Test Case:
Fire a clean build for core-image-sato with the following lines in local.conf:
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P 'root' root; \
useradd -P 'test' --create-home test; \
groupadd -g 1314 no-zuo-no-die;"The following changes since commit fa325e44f5b429b4038022b31285af9c94672943:
insane: Ensure do_package_qa happens after do_packagedata (2014-07-11 23:19:18 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib ChenQi/shadow-4.2.1
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/shadow-4.2.1
Chen Qi (1):
shadow: upgrade from 4.1.4.3 to 4.2.1
...-create-parent-directories-when-necessary.patch | 109 ++
.../shadow/files/add_root_cmd_groupmems.patch | 75 --
.../shadow/files/add_root_cmd_options.patch | 1384 --------------------
.../allow-for-setting-password-in-clear-text.patch | 215 ++-
...fix-unexpected-open-failure-in-chroot-env.patch | 46 +
.../shadow/files/fix-etc-gshadow-reading.patch | 36 -
...installation-failure-with-subids-disabled.patch | 28 +
.../shadow-4.1.4.2-env-reset-keep-locale.patch | 31 -
.../files/shadow-4.1.4.2-groupmod-pam-check.patch | 36 -
.../files/shadow-4.1.4.2-su_no_sanitize_env.patch | 31 -
.../shadow/files/shadow.automake-1.11.patch | 106 --
.../files/shadow_fix_for_automake-1.12.patch | 23 -
.../files/slackware_fix_for_glib-2.17_crypt.patch | 63 -
meta/recipes-extended/shadow/files/useradd.patch | 17 -
...-compilation-failure-with-subids-disabled.patch | 33 +
...uretty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} | 0
...-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} | 0
meta/recipes-extended/shadow/shadow.inc | 36 +-
.../shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} | 0
19 files changed, 333 insertions(+), 1936 deletions(-)
create mode 100644 meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
delete mode 100644 meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
delete mode 100644 meta/recipes-extended/shadow/files/add_root_cmd_options.patch
create mode 100644 meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
delete mode 100644 meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
create mode 100644 meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
delete mode 100644 meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
delete mode 100644 meta/recipes-extended/shadow/files/useradd.patch
create mode 100644 meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
rename meta/recipes-extended/shadow/{shadow-securetty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} (100%)
rename meta/recipes-extended/shadow/{shadow-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} (100%)
rename meta/recipes-extended/shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} (100%)Signature · 1 line
1.7.9.5
PATCH v4 1/1 shadow: upgrade from 4.1.4.3 to 4.2.1
Upgrade shadow from 4.1.4.3 to 4.2.1.
Changes during this upgrade are as following.
1. Remove the "merged" patches. These patches are either merged or the same functionality has been implemented upstream.
add_root_cmd_groupmems.patch
add_root_cmd_options.patch
fix-etc-gshadow-reading.patch
shadow-4.1.4.2-env-reset-keep-locale.patch
shadow-4.1.4.2-groupmod-pam-check.patch
shadow-4.1.4.2-su_no_sanitize_env.patch
shadow.automake-1.11.patch
shadow_fix_for_automake-1.12.patch
useradd.patch
2. Remove the unneeded patch.
The following patch has been removed because the logic in the related codes of the new version has been changed. In specific, the codes now can handle the 'NULL' return value. So there's no need for the following patch.
slackware_fix_for_glib-2.17_crypt.patch
3. Teak the current patch to match the new version.
allow-for-setting-password-in-clear-text.patch
4. Add a patch to fix compilation failure.
usermod-fix-compilation-failure-with-subids-disabled.patch
5. Add a patch to fix the installation failure.
fix-installation-failure-with-subids-disabled.patch
5. Add a patch to fix the failure at rootfs time if extrausers is inherited.
commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
6. Fix the bad section in the recipe.
7. Disable the new subids feature in the new version as it doesn't support cross compilation for now.
8. Modify the pkg_postinst to exit 1' if the pwconv' or `grpconv' fails. Also, fix the arguments to use '--root $D' instead of '--root=$D'.
9. Add a patch for shadow-native to create parent directories when necessary.
0001-useradd.c-create-parent-directories-when-necessary.patch
---
...-create-parent-directories-when-necessary.patch | 109 ++
.../shadow/files/add_root_cmd_groupmems.patch | 75 --
.../shadow/files/add_root_cmd_options.patch | 1384 --------------------
.../allow-for-setting-password-in-clear-text.patch | 215 ++-
...fix-unexpected-open-failure-in-chroot-env.patch | 46 +
.../shadow/files/fix-etc-gshadow-reading.patch | 36 -
...installation-failure-with-subids-disabled.patch | 28 +
.../shadow-4.1.4.2-env-reset-keep-locale.patch | 31 -
.../files/shadow-4.1.4.2-groupmod-pam-check.patch | 36 -
.../files/shadow-4.1.4.2-su_no_sanitize_env.patch | 31 -
.../shadow/files/shadow.automake-1.11.patch | 106 --
.../files/shadow_fix_for_automake-1.12.patch | 23 -
.../files/slackware_fix_for_glib-2.17_crypt.patch | 63 -
meta/recipes-extended/shadow/files/useradd.patch | 17 -
...-compilation-failure-with-subids-disabled.patch | 33 +
...uretty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} | 0
...-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} | 0
meta/recipes-extended/shadow/shadow.inc | 36 +-
.../shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} | 0
19 files changed, 333 insertions(+), 1936 deletions(-)
create mode 100644 meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
delete mode 100644 meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
delete mode 100644 meta/recipes-extended/shadow/files/add_root_cmd_options.patch
create mode 100644 meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
delete mode 100644 meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
create mode 100644 meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
delete mode 100644 meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
delete mode 100644 meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
delete mode 100644 meta/recipes-extended/shadow/files/useradd.patch
create mode 100644 meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
rename meta/recipes-extended/shadow/{shadow-securetty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} (100%)
rename meta/recipes-extended/shadow/{shadow-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} (100%)
rename meta/recipes-extended/shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} (100%)meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch new file +109 -0
@@ -0,0 +1,109 @@ +Upstream-Status: Inappropriate [OE specific] + +Subject: useradd.c: create parent directories when necessary + +Signed-off-by: Chen Qi <[email protected]> +--- + src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 49 insertions(+), 23 deletions(-) + +diff --git a/src/useradd.c b/src/useradd.c +index 4bd969d..cb5dd6c 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -1893,6 +1893,35 @@ static void usr_update (void) + } + + /* ++ * mkdir_p - create directories, including parent directories when needed ++ * ++ * similar to `mkdir -p' ++ */ ++void mkdir_p(const char *path) { ++ int len = strlen(path); ++ char newdir[len + 1]; ++ mode_t mode = 0755; ++ int i = 0; ++ ++ if (path[i] == '\0') { ++ return; ++ } ++ ++ /* skip the leading '/' */ ++ i++; ++ ++ while(path[i] != '\0') { ++ if (path[i] == '/') { ++ strncpy(newdir, path, i); ++ newdir[i] = '\0'; ++ mkdir(newdir, mode); ++ } ++ i++; ++ } ++ mkdir(path, mode); ++} ++ ++/* + * create_home - create the user's home directory + * + * create_home() creates the user's home directory if it does not +@@ -1907,36 +1936,33 @@ static void create_home (void) + fail_exit (E_HOMEDIR); + } + #endif +- /* XXX - create missing parent directories. --marekm */ +- if (mkdir (user_home, 0) != 0) { +- fprintf (stderr, +- _("%s: cannot create directory %s\n"), +- Prog, user_home); +-#ifdef WITH_AUDIT +- audit_logger (AUDIT_ADD_USER, Prog, +- "adding home directory", +- user_name, (unsigned int) user_id, +- SHADOW_AUDIT_FAILURE); +-#endif +- fail_exit (E_HOMEDIR); +- } +- chown (user_home, user_id, user_gid); +- chmod (user_home, +- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); +- home_added = true; ++ mkdir_p(user_home); ++ } ++ if (access (user_home, F_OK) != 0) { + #ifdef WITH_AUDIT + audit_logger (AUDIT_ADD_USER, Prog, + "adding home directory", + user_name, (unsigned int) user_id, +- SHADOW_AUDIT_SUCCESS); ++ SHADOW_AUDIT_FAILURE); + #endif +-#ifdef WITH_SELINUX +- /* Reset SELinux to create files with default contexts */ +- if (reset_selinux_file_context () != 0) { +- fail_exit (E_HOMEDIR); +- } ++ fail_exit (E_HOMEDIR); ++ } ++ chown (user_home, user_id, user_gid); ++ chmod (user_home, ++ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); ++ home_added = true; ++#ifdef WITH_AUDIT ++ audit_logger (AUDIT_ADD_USER, Prog, ++ "adding home directory", ++ user_name, (unsigned int) user_id, ++ SHADOW_AUDIT_SUCCESS); + #endif ++#ifdef WITH_SELINUX ++ /* Reset SELinux to create files with default contexts */ ++ if (reset_selinux_file_context () != 0) { ++ fail_exit (E_HOMEDIR); + } ++#endif + } + + /* +-- +1.7.9.5 +
meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch deleted +0 -75
75 lines not on this page · raw message
meta/recipes-extended/shadow/files/add_root_cmd_options.patch deleted +0 -1384
1,384 lines not on this page · raw message
meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch +104 -111
301 lines not on this page · raw message
meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch new file +46 -0
46 lines not on this page · raw message
meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch deleted +0 -36
@@ -1,36 +0,0 @@ -shadow: Fix parsing of gshadow entries - -Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096] - -newgrp command does not function properly. -Even with the valid password, it outputs: "'Invalid password'" - -Signed-off-by: Roy.Li <[email protected]> - -2010-02-14 Michael Bunk <[email protected]> - - * NEWS, lib/gshadow.c: Fix parsing of gshadow entries. - -diff -urpN a/lib/gshadow.c b/lib/gshadow.c ---- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800 -+++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800 -@@ -222,6 +222,7 @@ void endsgent (void) - if (NULL == buf) { - return NULL; - } -+ buflen = BUFSIZ; - } - - if (NULL == fp) { -@@ -229,9 +230,9 @@ void endsgent (void) - } - - #ifdef USE_NIS -- while (fgetsx (buf, (int) sizeof buf, fp) == buf) -+ while (fgetsx (buf, (int) buflen, fp) == buf) - #else -- if (fgetsx (buf, (int) sizeof buf, fp) == buf) -+ if (fgetsx (buf, (int) buflen, fp) == buf) - #endif - { - while ( ((cp = strrchr (buf, '\n')) == NULL)
meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch new file +28 -0
@@ -0,0 +1,28 @@ +Upstream-Status: Pending + +Subject: fix installation failure with subids disabled + +Signed-off-by: Chen Qi <[email protected]> +--- + src/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 25e288d..076f8ef 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ + noinst_PROGRAMS = id sulogin + + suidbins = su +-suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap ++suidubins = chage chfn chsh expiry gpasswd newgrp passwd ++if ENABLE_SUBIDS ++suidubins += newgidmap newuidmap ++endif + if ACCT_TOOLS_SETUID + suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod + endif +-- +1.7.9.5 +
meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch deleted +0 -31
@@ -1,31 +0,0 @@ -# commit message copied from openembedded: -# commit 246c80637b135f3a113d319b163422f98174ee6c -# Author: Khem Raj <[email protected]> -# Date: Wed Jun 9 13:37:03 2010 -0700 -# -# shadow-4.1.4.2: Add patches to support dots in login id. -# -# Signed-off-by: Khem Raj <[email protected]> -# -# comment added by Kevin Tian <[email protected]>, 2010-08-11 - -http://bugs.gentoo.org/283725 -https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480 - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <[email protected]> - -Index: shadow-4.1.4.2/libmisc/env.c -=================================================================== ---- shadow-4.1.4.2.orig/libmisc/env.c 2009-04-27 13:07:56.000000000 -0700 -+++ shadow-4.1.4.2/libmisc/env.c 2010-06-03 17:44:51.456408474 -0700 -@@ -251,7 +251,7 @@ void sanitize_env (void) - if (strncmp (*cur, *bad, strlen (*bad)) != 0) { - continue; - } -- if (strchr (*cur, '/') != NULL) { -+ if (strchr (*cur, '/') == NULL) { - continue; /* OK */ - } - for (move = cur; NULL != *move; move++) {
meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch deleted +0 -36
@@ -1,36 +0,0 @@ -# commit message copied from openembedded: -# commit 246c80637b135f3a113d319b163422f98174ee6c -# Author: Khem Raj <[email protected]> -# Date: Wed Jun 9 13:37:03 2010 -0700 -# -# shadow-4.1.4.2: Add patches to support dots in login id. -# -# Signed-off-by: Khem Raj <[email protected]> -# -# comment added by Kevin Tian <[email protected]>, 2010-08-11 - -http://bugs.gentoo.org/300790 -http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html - -2009-11-05 Nicolas François <[email protected]> - - * NEWS, src/groupmod.c: Fixed groupmod when configured with - --enable-account-tools-setuid. - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <[email protected]> - -Index: shadow-4.1.4.2/src/groupmod.c -=================================================================== ---- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700 -+++ shadow-4.1.4.2/src/groupmod.c 2010-06-03 17:45:43.828952613 -0700 -@@ -720,7 +720,7 @@ int main (int argc, char **argv) - { - struct passwd *pampw; - pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */ -- if (NULL == pamh) { -+ if (NULL == pampw) { - fprintf (stderr, - _("%s: Cannot determine your user name.\n"), - Prog);
meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch deleted +0 -31
@@ -1,31 +0,0 @@ -# commit message copied from openembedded: -# commit 246c80637b135f3a113d319b163422f98174ee6c -# Author: Khem Raj <[email protected]> -# Date: Wed Jun 9 13:37:03 2010 -0700 -# -# shadow-4.1.4.2: Add patches to support dots in login id. -# -# Signed-off-by: Khem Raj <[email protected]> -# -# comment added by Kevin Tian <[email protected]>, 2010-08-11 - -http://bugs.gentoo.org/show_bug.cgi?id=301957 -https://alioth.debian.org/scm/browser.php?group_id=30580 - -Upstream-Status: Pending - -Signed-off-by: Scott Garman <[email protected]> - -Index: shadow-4.1.4.2/src/su.c -=================================================================== ---- shadow-4.1.4.2.orig/src/su.c 2009-07-23 13:38:56.000000000 -0700 -+++ shadow-4.1.4.2/src/su.c 2010-06-03 17:46:47.718944010 -0700 -@@ -378,7 +378,7 @@ int main (int argc, char **argv) - #endif - #endif /* !USE_PAM */ - -- sanitize_env (); -+ /* sanitize_env (); */ - - (void) setlocale (LC_ALL, ""); - (void) bindtextdomain (PACKAGE, LOCALEDIR);
meta/recipes-extended/shadow/files/shadow.automake-1.11.patch deleted +0 -106
106 lines not on this page · raw message
meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch deleted +0 -23
@@ -1,23 +0,0 @@ -Upstream-Status: pending - -Automake 1.12 has deprecated automatic de-ANSI-fication support - -This patch avoids this issue with automake 1.12: - -| configure.in:22: error: automatic de-ANSI-fication support has been removed - -Signed-Off-By: Nitin A Kamble <[email protected]> -2012/05/02 - -Index: shadow-4.1.4.3/configure.in -=================================================================== ---- shadow-4.1.4.3.orig/configure.in -+++ shadow-4.1.4.3/configure.in -@@ -19,7 +19,6 @@ AC_PROG_CC - AC_ISC_POSIX - AC_PROG_LN_S - AC_PROG_YACC --AM_C_PROTOTYPES - AM_PROG_LIBTOOL - - dnl Checks for libraries.
meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch deleted +0 -63
63 lines not on this page · raw message
meta/recipes-extended/shadow/files/useradd.patch deleted +0 -17
@@ -1,17 +0,0 @@ -Work around a bug introduced with the --root option which was causing -all other arguments to be ignored. - -Upstream-Status: inappropriate -Signed-off-by: Phil Blundell <[email protected]> - ---- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100 -+++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100 -@@ -1957,6 +1957,8 @@ - - get_defaults (); - -+ optind = 1; -+ - process_flags (argc, argv); - - #ifdef ACCT_TOOLS_SETUID
meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch new file +33 -0
@@ -0,0 +1,33 @@ +Upstream-Status: Pending + +usermod: fix compilation failure with subids disabled + +Signed-off-by: Chen Qi <[email protected]> +--- + src/usermod.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/usermod.c b/src/usermod.c +index e7d4351..685b50a 100644 +--- a/src/usermod.c ++++ b/src/usermod.c +@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv) + Prog, (unsigned long) user_newid); + exit (E_UID_IN_USE); + } +- ++#ifdef ENABLE_SUBIDS + if ( (vflg || Vflg) + && !is_sub_uid) { + fprintf (stderr, +@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv) + Prog, sub_gid_dbname (), "-w", "-W"); + exit (E_USAGE); + } ++#endif + } + + /* +-- +1.7.9.5 +
meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb renamed from meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb +0 -0
meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb renamed from meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb +0 -0
meta/recipes-extended/shadow/shadow.inc +13 -23
@@ -1,50 +1,39 @@ SUMMARY = "Tools to change and administer password and group data" HOMEPAGE = "http://pkg-shadow.alioth.debian.org" BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" -SECTION = "base utils" +SECTION = "base/utils" LICENSE = "BSD | Artistic-1.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ +LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" DEPENDS = "shadow-native" DEPENDS_class-native = "" DEPENDS_class-nativesdk = "" -SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ - file://shadow.automake-1.11.patch \ - file://shadow_fix_for_automake-1.12.patch \ +SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ file://shadow-4.1.3-dots-in-usernames.patch \ - file://shadow-4.1.4.2-env-reset-keep-locale.patch \ + file://usermod-fix-compilation-failure-with-subids-disabled.patch \ + file://fix-installation-failure-with-subids-disabled.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ " SRC_URI_append_class-target = " \ file://login_defs_pam.sed \ - file://shadow-4.1.4.2-groupmod-pam-check.patch \ - file://shadow-4.1.4.2-su_no_sanitize_env.patch \ file://shadow-update-pam-conf.patch \ - file://slackware_fix_for_glib-2.17_crypt.patch \ - file://fix-etc-gshadow-reading.patch \ " SRC_URI_append_class-native = " \ - file://add_root_cmd_options.patch \ file://disable-syslog.patch \ - file://useradd.patch \ - file://add_root_cmd_groupmems.patch \ file://allow-for-setting-password-in-clear-text.patch \ + file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ + file://0001-useradd.c-create-parent-directories-when-necessary.patch \ " SRC_URI_append_class-nativesdk = " \ - file://add_root_cmd_options.patch \ file://disable-syslog.patch \ - file://useradd.patch \ - file://add_root_cmd_groupmems.patch \ " -SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" -SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" - -PR = "r14" +SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" +SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41" # Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \
@@ -61,6 +50,7 @@ EXTRA_OECONF += "--without-audit \ --without-libcrack \ --without-selinux \ --with-group-name-max-length=24 \ + --enable-subordinate-ids=no \ ${NSCDOPT}" NSCDOPT = ""
@@ -166,11 +156,11 @@ ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" pkg_postinst_${PN} () { if [ "x$D" != "x" ]; then - rootarg="--root=$D" + rootarg="--root $D" else rootarg="" fi - pwconv $rootarg - grpconv $rootarg + pwconv $rootarg || exit 1 + grpconv $rootarg || exit 1 }
meta/recipes-extended/shadow/shadow_4.2.1.bb renamed from meta/recipes-extended/shadow/shadow_4.1.4.3.bb +0 -0
Signature · 1 line
1.7.9.5
Quoted 9 lines · Chen Qi
Test Case:
Fire a clean build for core-image-sato with the following lines in local.conf:
INHERIT += "extrausers"EXTRA_USERS_PARAMS = "usermod -P 'root' root; \ useradd -P 'test' --create-home test; \ groupadd -g 1314 no-zuo-no-die;"
There seems to be a failure with PAM enabled. We see this failure with the sanity tests enabled.
We enable pam via DISTRO_FEATURES_append = " pam" and the sanity tests as follows:
INHERIT += "testimage"TEST_SUITES_append = " pam"
bitbake core-image-sato and then bitbake core-image-sato -c testimage
Quoted 83 lines
| ====================================================================== | FAIL: test_pam (oeqa.runtime.pam.PamBasicTest) | ---------------------------------------------------------------------- | Traceback (most recent call last): | File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-pam/build/meta/lib/oeqa/utils/decorators.py", line 50, in wrapped_f | return f(*args) | File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-pam/build/meta/lib/oeqa/runtime/pam.py", line 20, in test_pam | self.assertEqual(status, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output)) | AssertionError: 0 != 6 : passwd command does not work as expected. Status and output:0 and Usage: passwd [options] [LOGIN] | | Options: | -a, --all report password status on all accounts | -d, --delete delete the password for the named account | -e, --expire force expire the password for the named account | -h, --help display this help message and exit | -k, --keep-tokens change password only if expired | -i, --inactive INACTIVE set password inactive after expiration | to INACTIVE | -l, --lock lock the password of the named account | -n, --mindays MIN_DAYS set minimum number of days before password | change to MIN_DAYS | -q, --quiet quiet mode | -r, --repository REPOSITORY change password in REPOSITORY repository | -R, --root CHROOT_DIR directory to chroot into | -S, --status report password status on the named account | -u, --unlock unlock the password of the named account | -w, --warndays WARN_DAYS set expiration warning days to WARN_DAYS | -x, --maxdays MAX_DAYS set maximum number of days before password | change to MAX_DAYSThe following changes since commit
fa325e44f5b429b4038022b31285af9c94672943:insane: Ensure do_package_qa happens after do_packagedata (2014-07-11 23:19:18 +0100)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribChenQi/shadow-4.2.1
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/shadow-4.2.1Chen Qi (1):
shadow: upgrade from 4.1.4.3 to 4.2.1...-create-parent-directories-when-necessary.patch | 109 ++ .../shadow/files/add_root_cmd_groupmems.patch | 75 -- .../shadow/files/add_root_cmd_options.patch | 1384 -------------------- .../allow-for-setting-password-in-clear-text.patch | 215 ++- ...fix-unexpected-open-failure-in-chroot-env.patch | 46 + .../shadow/files/fix-etc-gshadow-reading.patch | 36 - ...installation-failure-with-subids-disabled.patch | 28 + .../shadow-4.1.4.2-env-reset-keep-locale.patch | 31 - .../files/shadow-4.1.4.2-groupmod-pam-check.patch | 36 - .../files/shadow-4.1.4.2-su_no_sanitize_env.patch | 31 - .../shadow/files/shadow.automake-1.11.patch | 106 -- .../files/shadow_fix_for_automake-1.12.patch | 23 - .../files/slackware_fix_for_glib-2.17_crypt.patch | 63 - meta/recipes-extended/shadow/files/useradd.patch | 17 - ...-compilation-failure-with-subids-disabled.patch | 33 + ...uretty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} | 0 ...-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} | 0 meta/recipes-extended/shadow/shadow.inc | 36 +- .../shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} | 0 19 files changed, 333 insertions(+), 1936 deletions(-)create mode 100644
meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patchdelete mode 100644meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
delete mode 100644meta/recipes-extended/shadow/files/add_root_cmd_options.patch
create mode 100644meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patchdelete mode 100644meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
create mode 100644meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patchdelete mode 100644meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patchdelete mode 100644meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patchdelete mode 100644meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patchdelete mode 100644meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
delete mode 100644meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
delete mode 100644meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patchdelete mode 100644meta/recipes-extended/shadow/files/useradd.patch
create mode 100644meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patchrename meta/recipes-extended/shadow/{shadow-securetty_4.1.4.3.bb => shadow-securetty_4.2.1.bb} (100%) rename meta/recipes-extended/shadow/{shadow-sysroot_4.1.4.3.bb => shadow-sysroot_4.2.1.bb} (100%) rename meta/recipes-extended/shadow/{shadow_4.1.4.3.bb => shadow_4.2.1.bb} (100%)