summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
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 12:02:42 +0100
commit4e489a02e09196b8979ad0ed6c8a97bfb47ef1ea (patch)
tree3121a09a5c75385064a1b0cb60d0b9c03a731ddc /meta/recipes-extended
parent27b2d3dc1cd660a254d7007d5e379a1b5f68b9ec (diff)
downloadpoky-4e489a02e09196b8979ad0ed6c8a97bfb47ef1ea.tar.gz
sudo: add pam support
According to DISTRO_FEATURES to add pam support for sudo, and import configure file from Fedora. (From OE-Core rev: 1f7e088f2d570d33c2344e32a05193b37a75ea76) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-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 @@
1#%PAM-1.0
2auth include common-auth
3account include common-account
4password include common-password
5session required pam_keyinit.so revoke
6session 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 @@
1require sudo.inc 1require sudo.inc
2 2
3PR = "r0" 3PR = "r1"
4 4
5SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ 5SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
6 file://libtool.patch" 6 file://libtool.patch \
7 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
8
9PAM_SRC_URI = "file://sudo.pam"
7 10
8SRC_URI[md5sum] = "e8330f0e63b0ecb2e12b5c76922818cc" 11SRC_URI[md5sum] = "e8330f0e63b0ecb2e12b5c76922818cc"
9SRC_URI[sha256sum] = "281f90c80547cf22132e351e7f61c25ba4ba9cf393438468f318f9a7884026fb" 12SRC_URI[sha256sum] = "281f90c80547cf22132e351e7f61c25ba4ba9cf393438468f318f9a7884026fb"
10 13
11EXTRA_OECONF += " --with-pam=no" 14EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
15
16do_install_append () {
17 for feature in ${DISTRO_FEATURES}; do
18 if [ "$feature" = "pam" ]; then
19 install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
20 break
21 fi
22 done
23}