xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/sudo/sudo.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Provide limited super user privileges to specific users"
2*4882a593SmuzhiyunDESCRIPTION = "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*4882a593SmuzhiyunHOMEPAGE = "http://www.sudo.ws"
4*4882a593SmuzhiyunBUGTRACKER = "http://www.sudo.ws/bugs/"
5*4882a593SmuzhiyunSECTION = "admin"
6*4882a593SmuzhiyunLICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & Zlib"
7*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE.md;md5=5100e20d35f9015f9eef6bdb27ba194f \
8*4882a593Smuzhiyun                    file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \
9*4882a593Smuzhiyun                    file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \
10*4882a593Smuzhiyun                    file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \
11*4882a593Smuzhiyun                    file://lib/util/getcwd.c;beginline=2;endline=27;md5=50f8d9667750e18dea4e84a935c12009 \
12*4882a593Smuzhiyun                    file://lib/util/glob.c;beginline=2;endline=31;md5=2852f68687544e3eb8a0a61665506f0e \
13*4882a593Smuzhiyun                    file://lib/util/snprintf.c;beginline=3;endline=33;md5=b70df6179969e38fcf68da91b53b8029 \
14*4882a593Smuzhiyun                    file://include/sudo_queue.h;beginline=2;endline=27;md5=ad578e9664d17a010b63e4bc0576ee8d \
15*4882a593Smuzhiyun                    file://lib/util/inet_pton.c;beginline=3;endline=17;md5=27785c9f5835093eda42aa0816a2d0b4 \
16*4882a593Smuzhiyun                    file://lib/util/arc4random.c;beginline=3;endline=20;md5=ced8636ecefa2ba907cfe390bc3bd964 \
17*4882a593Smuzhiyun                    file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=e30c2b777cdc00cfcaf7c445a10b262f \
18*4882a593Smuzhiyun                    file://lib/util/getentropy.c;beginline=1;endline=19;md5=a0f58be3d60b6dcd898ec5fe0866d36f \
19*4882a593Smuzhiyun                    "
20*4882a593Smuzhiyun
21*4882a593Smuzhiyuninherit autotools
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunPACKAGECONFIG ??= ""
24*4882a593SmuzhiyunPACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
25*4882a593SmuzhiyunPACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunEXTRA_OECONF = "--with-editor=${base_bindir}/vi --with-env-editor"
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunEXTRA_OECONF:append:libc-musl = " --disable-hardening "
30*4882a593Smuzhiyun
31*4882a593Smuzhiyundo_compile:prepend () {
32*4882a593Smuzhiyun       # Remove build host references from sudo_usage.h
33*4882a593Smuzhiyun       sed -i  \
34*4882a593Smuzhiyun           -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
35*4882a593Smuzhiyun           -e 's,--build=${BUILD_SYS},,g' \
36*4882a593Smuzhiyun           -e 's,--host=${HOST_SYS},,g' \
37*4882a593Smuzhiyun           ${B}/src/sudo_usage.h
38*4882a593Smuzhiyun}
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun# Explicitly create ${localstatedir}/lib before do_install to ensure
41*4882a593Smuzhiyun# the directory is accessible by all users. Otherwise the mkinstalldirs
42*4882a593Smuzhiyun# script (from sudo) will recursively create ${localstatedir}/lib/sudo
43*4882a593Smuzhiyun# and then chmod each directory with 0700 permissions, which isn't what
44*4882a593Smuzhiyun# we want (i.e, users would not be able to access /var/lib).
45*4882a593Smuzhiyundo_install:prepend (){
46*4882a593Smuzhiyun	mkdir -p ${D}/${localstatedir}/lib
47*4882a593Smuzhiyun}
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunCVE_VERSION_SUFFIX = "patch"
50