aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow.inc
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-13 10:57:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-17 15:37:06 +0000
commiteed66e85af5ca6bbdd80cc3d5cf8453e8d8880bc (patch)
treef7df7d8e766defe7f8232e13cddf0f8b535d939a /meta/recipes-extended/shadow/shadow.inc
parent5b5a506a6d81095c967304fe4ec38a4bc3dc1edd (diff)
downloadopenembedded-core-contrib-eed66e85af5ca6bbdd80cc3d5cf8453e8d8880bc.tar.gz
shadow: 'useradd' copies root's extended attributes
The copy of extended attributes is interesting for Smack systems because it allows to set the security template of the user's home directories without modifying the tools (useradd here). But the version of useradd that copies the extended attributes doesn't copy the extended attributes of the root. This can make use of homes impossible! This patch corrects the issue by copying the extended attributes of the root directory: /home/user will get the extended attributes of /etc/skel. The patch is submitted upstream (see http://lists.alioth.debian.org/pipermail/pkg-shadow-commits/2017-March/003804.html) The existing patch specific to open-embedded is updated: 0001-useradd.c-create-parent-directories-when-necessary.patch Also, attr are activated for native tools. This is needed when users are created during image creation. Signed-off-by: José Bollo <jose.bollo@iot.bzh> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/shadow/shadow.inc')
-rw-r--r--meta/recipes-extended/shadow/shadow.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index e59ff640e3..25283a9741 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -15,6 +15,7 @@ SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
file://fix-installation-failure-with-subids-disabled.patch \
file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
+ file://0001-useradd-copy-extended-attributes-of-home.patch \
${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
"
@@ -76,7 +77,7 @@ PAM_PLUGINS = "libpam-runtime \
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
-PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
PACKAGECONFIG_class-nativesdk = ""
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"