mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
util-linux: add runuser PAM config files to fix runuser error
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 (From OE-Core rev: a6616f1a7b8e30428e61b6437f2f48379efc101d) Signed-off-by: Shan Hai <shan.hai@windriver.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
|
||||
3
meta/recipes-core/util-linux/util-linux/runuser-l.pamd
Normal file
3
meta/recipes-core/util-linux/util-linux/runuser-l.pamd
Normal file
@@ -0,0 +1,3 @@
|
||||
auth include runuser
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include runuser
|
||||
4
meta/recipes-core/util-linux/util-linux/runuser.pamd
Normal file
4
meta/recipes-core/util-linux/util-linux/runuser.pamd
Normal file
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user