blob: 82040de8aa18e1dd0f3615fe2565ae62a38e4936 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Provide limited super user privileges to specific users"
2DESCRIPTION = "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."
3HOMEPAGE = "http://www.sudo.ws"
4BUGTRACKER = "http://www.sudo.ws/bugs/"
5SECTION = "admin"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05006LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & Zlib"
Andrew Geisslereff27472021-10-29 15:35:00 -05007LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=b969d389e79703121cbffc9f3ea18a8b \
Andrew Geissler82c905d2020-04-13 13:39:40 -05008 file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \
9 file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \
10 file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \
11 file://lib/util/getcwd.c;beginline=2;endline=27;md5=50f8d9667750e18dea4e84a935c12009 \
12 file://lib/util/glob.c;beginline=2;endline=31;md5=2852f68687544e3eb8a0a61665506f0e \
13 file://lib/util/snprintf.c;beginline=3;endline=33;md5=b70df6179969e38fcf68da91b53b8029 \
14 file://include/sudo_queue.h;beginline=2;endline=27;md5=ad578e9664d17a010b63e4bc0576ee8d \
15 file://lib/util/inet_pton.c;beginline=3;endline=17;md5=27785c9f5835093eda42aa0816a2d0b4 \
16 file://lib/util/arc4random.c;beginline=3;endline=20;md5=ced8636ecefa2ba907cfe390bc3bd964 \
17 file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=e30c2b777cdc00cfcaf7c445a10b262f \
18 file://lib/util/getentropy.c;beginline=1;endline=19;md5=a0f58be3d60b6dcd898ec5fe0866d36f \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21inherit autotools
22
23PACKAGECONFIG ??= ""
24PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Patrick Williams213cb262021-08-07 19:21:33 -050027CONFFILES:${PN} = "${sysconfdir}/sudoers"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
Andrew Geissler82c905d2020-04-13 13:39:40 -050029EXTRA_OECONF = "--with-editor=${base_bindir}/vi --with-env-editor"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
Patrick Williams213cb262021-08-07 19:21:33 -050031EXTRA_OECONF:append:libc-musl = " --disable-hardening "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
Patrick Williams213cb262021-08-07 19:21:33 -050033do_compile:prepend () {
Andrew Geisslereff27472021-10-29 15:35:00 -050034 # Remove build host references from sudo_usage.h
35 sed -i \
36 -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
37 -e 's,--build=${BUILD_SYS},,g' \
38 -e 's,--host=${HOST_SYS},,g' \
39 ${B}/src/sudo_usage.h
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040}
41
42# Explicitly create ${localstatedir}/lib before do_install to ensure
43# the directory is accessible by all users. Otherwise the mkinstalldirs
44# script (from sudo) will recursively create ${localstatedir}/lib/sudo
45# and then chmod each directory with 0700 permissions, which isn't what
46# we want (i.e, users would not be able to access /var/lib).
Patrick Williams213cb262021-08-07 19:21:33 -050047do_install:prepend (){
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 mkdir -p ${D}/${localstatedir}/lib
49}
Andrew Geissler95ac1b82021-03-31 14:34:31 -050050
51CVE_VERSION_SUFFIX = "patch"