summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2018-08-01 14:46:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-02 09:30:11 +0100
commit482d34825d9176f31187f2d91ecb3cf286ade12d (patch)
tree038474923964d35e60dd651b3ddffb09764b8656 /meta/recipes-extended
parent67892cc11216ef272fc9c584530d1f50b62d39d2 (diff)
downloadpoky-482d34825d9176f31187f2d91ecb3cf286ade12d.tar.gz
sudo: add PACKAGECONFIG for pam-wheel
The pam_wheel PAM module is used to enforce the so-called wheel group. By default it permits root access to the system if the applicant user is a member of the wheel group. Add PACKAGECONFIG to enable pam_wheel module for sudo. (From OE-Core rev: 7a46ca79b18527a56de470fcaaf95c870c097cf6) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/sudo/sudo.inc1
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.23.bb4
2 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 6e57669a01..69dccde592 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -19,6 +19,7 @@ inherit autotools
19 19
20PACKAGECONFIG ??= "" 20PACKAGECONFIG ??= ""
21PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" 21PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
22PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
22 23
23CONFFILES_${PN} = "${sysconfdir}/sudoers" 24CONFFILES_${PN} = "${sysconfdir}/sudoers"
24 25
diff --git a/meta/recipes-extended/sudo/sudo_1.8.23.bb b/meta/recipes-extended/sudo/sudo_1.8.23.bb
index 9756fe26d7..ab9c8cbea2 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.23.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.23.bb
@@ -22,6 +22,10 @@ EXTRA_OECONF += " \
22do_install_append () { 22do_install_append () {
23 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then 23 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
24 install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo 24 install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
25 if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then
26 echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo
27 sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers
28 fi
25 fi 29 fi
26 30
27 chmod 4111 ${D}${bindir}/sudo 31 chmod 4111 ${D}${bindir}/sudo