diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-extended/sudo | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended/sudo')
-rw-r--r-- | meta/recipes-extended/sudo/files/sudo.pam | 6 | ||||
-rw-r--r-- | meta/recipes-extended/sudo/sudo.inc | 41 | ||||
-rw-r--r-- | meta/recipes-extended/sudo/sudo_1.8.9p5.bb | 23 |
3 files changed, 70 insertions, 0 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.inc b/meta/recipes-extended/sudo/sudo.inc new file mode 100644 index 0000000000..0aa5193375 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo.inc | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "Provide limited super user privileges to specific users" | ||
2 | DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments." | ||
3 | HOMEPAGE = "http://www.sudo.ws" | ||
4 | BUGTRACKER = "http://www.sudo.ws/bugs/" | ||
5 | SECTION = "admin" | ||
6 | LICENSE = "ISC & BSD & Zlib" | ||
7 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=923752f88decdea9d69f92fe42c2af80 \ | ||
8 | file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \ | ||
9 | file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ | ||
10 | file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ | ||
11 | file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ | ||
12 | file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \ | ||
13 | file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
17 | PACKAGECONFIG ??= "" | ||
18 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
19 | |||
20 | EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" | ||
21 | |||
22 | do_configure_prepend () { | ||
23 | if [ ! -e ${S}/acinclude.m4 ]; then | ||
24 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 | ||
25 | fi | ||
26 | } | ||
27 | |||
28 | # mksigname/mksiglist are used on build host to generate source files | ||
29 | do_compile_prepend () { | ||
30 | oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C compat mksigname mksiglist | ||
31 | } | ||
32 | |||
33 | # Explicitly create ${localstatedir}/lib before do_install to ensure | ||
34 | # the directory is accessible by all users. Otherwise the mkinstalldirs | ||
35 | # script (from sudo) will recursively create ${localstatedir}/lib/sudo | ||
36 | # and then chmod each directory with 0700 permissions, which isn't what | ||
37 | # we want (i.e, users would not be able to access /var/lib). | ||
38 | do_install_prepend (){ | ||
39 | mkdir -p ${D}/${localstatedir}/lib | ||
40 | } | ||
41 | |||
diff --git a/meta/recipes-extended/sudo/sudo_1.8.9p5.bb b/meta/recipes-extended/sudo/sudo_1.8.9p5.bb new file mode 100644 index 0000000000..b4d18e88ff --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.8.9p5.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | require sudo.inc | ||
2 | |||
3 | SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ | ||
4 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
5 | |||
6 | PAM_SRC_URI = "file://sudo.pam" | ||
7 | |||
8 | SRC_URI[md5sum] = "d3f1f1cfca6b2b06b048e1abb7d0227e" | ||
9 | SRC_URI[sha256sum] = "bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21" | ||
10 | |||
11 | DEPENDS += " ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
12 | RDEPENDS_${PN} += " ${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" | ||
13 | |||
14 | EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" | ||
15 | |||
16 | do_install_append () { | ||
17 | if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then | ||
18 | install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo | ||
19 | fi | ||
20 | |||
21 | chmod 4111 ${D}${bindir}/sudo | ||
22 | chmod 0440 ${D}${sysconfdir}/sudoers | ||
23 | } | ||