diff options
author | Kang Kai <kai.kang@windriver.com> | 2011-07-20 11:17:07 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-27 12:02:42 +0100 |
commit | 4e489a02e09196b8979ad0ed6c8a97bfb47ef1ea (patch) | |
tree | 3121a09a5c75385064a1b0cb60d0b9c03a731ddc /meta | |
parent | 27b2d3dc1cd660a254d7007d5e379a1b5f68b9ec (diff) | |
download | poky-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')
-rw-r--r-- | meta/recipes-extended/sudo/files/sudo.pam | 6 | ||||
-rw-r--r-- | meta/recipes-extended/sudo/sudo_1.8.1p2.bb | 18 |
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 | ||
2 | auth include common-auth | ||
3 | account include common-account | ||
4 | password include common-password | ||
5 | session required pam_keyinit.so revoke | ||
6 | 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 @@ | |||
1 | require sudo.inc | 1 | require sudo.inc |
2 | 2 | ||
3 | PR = "r0" | 3 | PR = "r1" |
4 | 4 | ||
5 | SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ | 5 | SRC_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 | |||
9 | PAM_SRC_URI = "file://sudo.pam" | ||
7 | 10 | ||
8 | SRC_URI[md5sum] = "e8330f0e63b0ecb2e12b5c76922818cc" | 11 | SRC_URI[md5sum] = "e8330f0e63b0ecb2e12b5c76922818cc" |
9 | SRC_URI[sha256sum] = "281f90c80547cf22132e351e7f61c25ba4ba9cf393438468f318f9a7884026fb" | 12 | SRC_URI[sha256sum] = "281f90c80547cf22132e351e7f61c25ba4ba9cf393438468f318f9a7884026fb" |
10 | 13 | ||
11 | EXTRA_OECONF += " --with-pam=no" | 14 | EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" |
15 | |||
16 | do_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 | } | ||