summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sudo
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2011-07-20 11:17:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-27 11:54:50 +0100
commit1f7e088f2d570d33c2344e32a05193b37a75ea76 (patch)
treea7c5d61f3ddbe0ad698a98ddfd05859a63ddee5f /meta/recipes-extended/sudo
parent7c08305f8008ab322d19d0a0852a851fd44ae510 (diff)
downloadopenembedded-core-1f7e088f2d570d33c2344e32a05193b37a75ea76.tar.gz
openembedded-core-1f7e088f2d570d33c2344e32a05193b37a75ea76.tar.bz2
openembedded-core-1f7e088f2d570d33c2344e32a05193b37a75ea76.zip
sudo: add pam support
According to DISTRO_FEATURES to add pam support for sudo, and import configure file from Fedora. Signed-off-by: Kang Kai <kai.kang@windriver.com>
Diffstat (limited to 'meta/recipes-extended/sudo')
-rw-r--r--meta/recipes-extended/sudo/files/sudo.pam6
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.1p2.bb18
2 files changed, 21 insertions, 3 deletions
diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam
new file mode 100644
index 0000000000..5bc26e7025
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/sudo.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth include common-auth
+account include common-account
+password include common-password
+session required pam_keyinit.so revoke
+session required pam_limits.so
diff --git a/meta/recipes-extended/sudo/sudo_1.8.1p2.bb b/meta/recipes-extended/sudo/sudo_1.8.1p2.bb
index 7eba307c0c..9cf9ecc083 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.1p2.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.1p2.bb
@@ -1,11 +1,23 @@
require sudo.inc
-PR = "r0"
+PR = "r1"
SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
- file://libtool.patch"
+ file://libtool.patch \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://sudo.pam"
SRC_URI[md5sum] = "e8330f0e63b0ecb2e12b5c76922818cc"
SRC_URI[sha256sum] = "281f90c80547cf22132e351e7f61c25ba4ba9cf393438468f318f9a7884026fb"
-EXTRA_OECONF += " --with-pam=no"
+EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
+
+do_install_append () {
+ for feature in ${DISTRO_FEATURES}; do
+ if [ "$feature" = "pam" ]; then
+ install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ break
+ fi
+ done
+}