Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=cc4bf2366b059c9598e3947f885931ec \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=805782a8466975716f8376b2be9aedde \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \ |
| 10 | file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ |
| 11 | file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ |
| 12 | file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ |
| 13 | file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \ |
| 14 | file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a \ |
| 16 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | |
| 18 | inherit autotools |
| 19 | |
| 20 | PACKAGECONFIG ??= "" |
| 21 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | |
| 24 | CONFFILES_${PN} = "${sysconfdir}/sudoers" |
| 25 | |
| 26 | EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" |
| 27 | |
| 28 | EXTRA_OECONF_append_libc-musl = " --disable-hardening " |
| 29 | |
| 30 | # mksigname/mksiglist are used on build host to generate source files |
| 31 | do_compile_prepend () { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 32 | # Remove build host references from sudo_usage.h |
| 33 | sed -i \ |
| 34 | -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ |
| 35 | -e 's,--build=${BUILD_SYS},,g' \ |
| 36 | -e 's,--host=${HOST_SYS},,g' \ |
| 37 | ${B}/src/sudo_usage.h |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist |
| 39 | } |
| 40 | |
| 41 | # Explicitly create ${localstatedir}/lib before do_install to ensure |
| 42 | # the directory is accessible by all users. Otherwise the mkinstalldirs |
| 43 | # script (from sudo) will recursively create ${localstatedir}/lib/sudo |
| 44 | # and then chmod each directory with 0700 permissions, which isn't what |
| 45 | # we want (i.e, users would not be able to access /var/lib). |
| 46 | do_install_prepend (){ |
| 47 | mkdir -p ${D}/${localstatedir}/lib |
| 48 | } |