aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2015-09-29 17:43:19 +0800
committerChen Qi <Qi.Chen@windriver.com>2015-09-29 17:57:08 +0800
commitf435d139003ffcac05e8079fad8fe42c1a473f9c (patch)
treec0f5954f9c989791329d4797901a1f072a3bff4a
parent4a1dec5c61f73e7cfa430271ed395094bb262f6b (diff)
downloadopenembedded-core-contrib-ChenQi/runuser-pam.tar.gz
openembedded-core-contrib-ChenQi/runuser-pam.tar.bz2
openembedded-core-contrib-ChenQi/runuser-pam.zip
util-linux: add runuser PAM config files to fix runuser errorChenQi/runuser-pam
The runuser command fails with below error message, add proper PAM config files to fix the problem. The config files are borrowed from CentOS 7.0 release. runuser: Failure setting user credentials Signed-off-by: Shan Hai <shan.hai@windriver.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc6
-rw-r--r--meta/recipes-core/util-linux/util-linux/runuser-l.pamd3
-rw-r--r--meta/recipes-core/util-linux/util-linux/runuser.pamd4
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.26.2.bb2
4 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index a4072bc6cf..594108f68c 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -163,6 +163,12 @@ do_install () {
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
rm -f ${D}${bindir}/chkdupexe
+
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -d ${D}${sysconfdir}/pam.d
+ install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
+ install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
+ fi
}
# reset and nologin causes a conflict with ncurses-native and shadow-native
diff --git a/meta/recipes-core/util-linux/util-linux/runuser-l.pamd b/meta/recipes-core/util-linux/util-linux/runuser-l.pamd
new file mode 100644
index 0000000000..4b368ccf5d
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/runuser-l.pamd
@@ -0,0 +1,3 @@
+auth include runuser
+session optional pam_keyinit.so force revoke
+session include runuser
diff --git a/meta/recipes-core/util-linux/util-linux/runuser.pamd b/meta/recipes-core/util-linux/util-linux/runuser.pamd
new file mode 100644
index 0000000000..48d133b9e7
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/runuser.pamd
@@ -0,0 +1,4 @@
+auth sufficient pam_rootok.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/meta/recipes-core/util-linux/util-linux_2.26.2.bb b/meta/recipes-core/util-linux/util-linux_2.26.2.bb
index fc7dc6e094..e09fdfaf5d 100644
--- a/meta/recipes-core/util-linux/util-linux_2.26.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.26.2.bb
@@ -13,6 +13,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
file://uclibc-__progname-conflict.patch \
file://configure-sbindir.patch \
file://fix-parallel-build.patch \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
${OLDHOST} \
"
SRC_URI[md5sum] = "9bdf368c395f1b70325d0eb22c7f48fb"