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 | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=6c76b73603ac7763ab0516ebfbe67b42 \ |
| 8 | file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=4a162fc04b86b03f5632180fe6076cda \ |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 9 | file://lib/util/reallocarray.c;beginline=3;endline=15;md5=b47f1f85a12f05a0744cd8b1b6f41a0d \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 11 | file://lib/util/getcwd.c;beginline=2;endline=27;md5=09068a19b4f6b6f0a0958655bfe98b63 \ |
| 12 | file://lib/util/glob.c;beginline=2;endline=31;md5=1f2f771c35fb0658d567a7824007e56d \ |
| 13 | file://lib/util/snprintf.c;beginline=3;endline=33;md5=63e48e1b992bce749a19dd9b2256e9a0 \ |
| 14 | file://include/sudo_queue.h;beginline=2;endline=27;md5=082b138b72ba3e568a13a25c3bf254dc \ |
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 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | file://lib/util/arc4random.c;beginline=3;endline=20;md5=15bdc89c1b003fa4d7353e6296ebfd68 \ |
| 17 | file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=31e630ac814d692fd0ab7a942659b46f \ |
| 18 | file://lib/util/getentropy.c;beginline=1;endline=19;md5=9f1a275ecd44cc264a2a4d5e06a75292 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
| 21 | inherit autotools |
| 22 | |
| 23 | PACKAGECONFIG ??= "" |
| 24 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | |
| 27 | CONFFILES_${PN} = "${sysconfdir}/sudoers" |
| 28 | |
| 29 | EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" |
| 30 | |
| 31 | EXTRA_OECONF_append_libc-musl = " --disable-hardening " |
| 32 | |
| 33 | # mksigname/mksiglist are used on build host to generate source files |
| 34 | do_compile_prepend () { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 35 | # Remove build host references from sudo_usage.h |
| 36 | sed -i \ |
| 37 | -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ |
| 38 | -e 's,--build=${BUILD_SYS},,g' \ |
| 39 | -e 's,--host=${HOST_SYS},,g' \ |
| 40 | ${B}/src/sudo_usage.h |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | 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 |
| 42 | } |
| 43 | |
| 44 | # Explicitly create ${localstatedir}/lib before do_install to ensure |
| 45 | # the directory is accessible by all users. Otherwise the mkinstalldirs |
| 46 | # script (from sudo) will recursively create ${localstatedir}/lib/sudo |
| 47 | # and then chmod each directory with 0700 permissions, which isn't what |
| 48 | # we want (i.e, users would not be able to access /var/lib). |
| 49 | do_install_prepend (){ |
| 50 | mkdir -p ${D}/${localstatedir}/lib |
| 51 | } |