Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
1bb48b1
app-admin/logrotate: Sync with Gentoo
Oct 12, 2026
9bf418c
app-admin/sudo: Sync with Gentoo
Oct 12, 2026
5dd5be9
app-arch/gzip: Sync with Gentoo
Oct 12, 2026
bdc7672
app-arch/xz-utils: Sync with Gentoo
Oct 12, 2026
08f6459
app-containers/conmon: Sync with Gentoo
Oct 12, 2026
bd5ccc4
app-containers/containerd: Sync with Gentoo
Oct 12, 2026
6b51050
app-containers/containers-shortnames: Sync with Gentoo
Oct 12, 2026
713c5ba
app-containers/docker: Sync with Gentoo
Oct 12, 2026
756c1dc
app-containers/docker-buildx: Sync with Gentoo
Oct 12, 2026
3de5360
app-containers/docker-cli: Sync with Gentoo
Oct 12, 2026
133e060
app-containers/incus: Sync with Gentoo
Oct 12, 2026
22c478c
app-containers/podman: Sync with Gentoo
Oct 12, 2026
ad4dd86
app-containers/runc: Sync with Gentoo
Oct 12, 2026
4b55ab2
app-crypt/ccid: Sync with Gentoo
Oct 12, 2026
7bf3dd3
app-crypt/gnupg: Sync with Gentoo
Oct 12, 2026
7928e74
app-crypt/mit-krb5: Sync with Gentoo
Oct 12, 2026
69707ec
app-crypt/tpm2-tools: Sync with Gentoo
Oct 12, 2026
e760568
app-doc/eclass-manpages: Sync with Gentoo
Oct 12, 2026
88ec9c2
app-editors/vim: Sync with Gentoo
Oct 12, 2026
e597006
app-editors/vim-core: Sync with Gentoo
Oct 12, 2026
e362211
app-emulation/qemu: Sync with Gentoo
Oct 12, 2026
da06273
app-eselect/eselect-pinentry: Sync with Gentoo
Oct 12, 2026
f63447c
app-misc/pax-utils: Sync with Gentoo
Oct 12, 2026
04773e7
app-portage/gemato: Sync with Gentoo
Oct 12, 2026
41af4fc
app-portage/gentoolkit: Sync with Gentoo
Oct 12, 2026
14207fa
app-shells/bash: Sync with Gentoo
Oct 12, 2026
d3f72fc
app-shells/gentoo-bashcomp: Sync with Gentoo
Oct 12, 2026
9246140
app-vim/gentoo-syntax: Sync with Gentoo
Oct 12, 2026
a25f78d
dev-build/automake: Sync with Gentoo
Oct 12, 2026
dd6b0f7
dev-build/automake-wrapper: Sync with Gentoo
Oct 12, 2026
2c87a8b
dev-build/cmake: Sync with Gentoo
Oct 12, 2026
17c1cb0
dev-build/libtool: Sync with Gentoo
Oct 12, 2026
da0e45d
dev-build/meson: Sync with Gentoo
Oct 12, 2026
bde046b
dev-build/ninja: Sync with Gentoo
Oct 12, 2026
42ad1d4
dev-db/sqlite: Sync with Gentoo
Oct 12, 2026
4a1dd47
dev-debug/gdb: Sync with Gentoo
Oct 12, 2026
c67198e
dev-debug/strace: Sync with Gentoo
Oct 12, 2026
db7d510
dev-lang/go: Sync with Gentoo
Oct 12, 2026
f3de8a1
dev-lang/perl: Sync with Gentoo
Oct 12, 2026
1fffe6d
dev-lang/python: Sync with Gentoo
Oct 12, 2026
49e52c5
dev-lang/rust: Sync with Gentoo
Oct 12, 2026
9418081
dev-lang/rust-bin: Sync with Gentoo
Oct 12, 2026
d275954
dev-lang/rust-common: Sync with Gentoo
Oct 12, 2026
4ba7b19
dev-lang/swig: Sync with Gentoo
Oct 12, 2026
ede9d9d
dev-libs/blake3: Sync with Gentoo
Oct 12, 2026
1a35616
dev-libs/elfutils: Sync with Gentoo
Oct 12, 2026
78b396a
dev-libs/expat: Sync with Gentoo
Oct 12, 2026
0c72ff1
dev-libs/gmp: Sync with Gentoo
Oct 12, 2026
18c5ea2
dev-libs/libksba: Sync with Gentoo
Oct 12, 2026
7ab7af2
dev-libs/libltdl: Sync with Gentoo
Oct 12, 2026
cfd4dda
dev-libs/libp11: Sync with Gentoo
Oct 12, 2026
591f0ee
dev-libs/libpcre2: Sync with Gentoo
Oct 12, 2026
283706e
dev-libs/libusb: Sync with Gentoo
Oct 12, 2026
a1e161e
dev-libs/libxml2: Sync with Gentoo
Oct 12, 2026
5f50bff
dev-libs/mpc: Sync with Gentoo
Oct 12, 2026
7eaf17b
dev-libs/mpfr: Sync with Gentoo
Oct 12, 2026
f3d7001
dev-libs/tree-sitter: Sync with Gentoo
Oct 12, 2026
e871ca6
dev-libs/xmlsec: Sync with Gentoo
Oct 12, 2026
4942465
dev-python/charset-normalizer: Sync with Gentoo
Oct 12, 2026
d98c182
dev-python/crcmod: Sync with Gentoo
Oct 12, 2026
d0c076d
dev-python/cryptography: Sync with Gentoo
Oct 12, 2026
2cf9484
dev-python/cython: Sync with Gentoo
Oct 12, 2026
156f9c4
dev-python/dependency-groups: Sync with Gentoo
Oct 12, 2026
16972b4
dev-python/distlib: Sync with Gentoo
Oct 12, 2026
41236a1
dev-python/editables: Sync with Gentoo
Oct 12, 2026
07c73b2
dev-python/fastjsonschema: Sync with Gentoo
Oct 12, 2026
57248a4
dev-python/flit-core: Sync with Gentoo
Oct 12, 2026
f3c2f21
dev-python/gpep517: Sync with Gentoo
Oct 12, 2026
a8bde55
dev-python/hatch-vcs: Sync with Gentoo
Oct 12, 2026
efc9970
dev-python/hatchling: Sync with Gentoo
Oct 12, 2026
cc82e69
dev-python/idna: Sync with Gentoo
Oct 12, 2026
28d63bc
dev-python/installer: Sync with Gentoo
Oct 12, 2026
4c7b3d6
dev-python/jaraco-collections: Sync with Gentoo
Oct 12, 2026
7822631
dev-python/jaraco-context: Sync with Gentoo
Oct 12, 2026
b31b71e
dev-python/jaraco-functools: Sync with Gentoo
Oct 12, 2026
685013b
dev-python/jaraco-text: Sync with Gentoo
Oct 12, 2026
0d8d2cc
dev-python/linkify-it-py: Sync with Gentoo
Oct 12, 2026
e73b675
dev-python/lxml: Sync with Gentoo
Oct 12, 2026
b3b1cc2
dev-python/markupsafe: Sync with Gentoo
Oct 12, 2026
be1cb95
dev-python/more-itertools: Sync with Gentoo
Oct 12, 2026
69467a8
dev-python/msgpack: Sync with Gentoo
Oct 12, 2026
430d487
dev-python/packaging: Sync with Gentoo
Oct 12, 2026
f1f153c
dev-python/pathspec: Sync with Gentoo
Oct 12, 2026
b1d7585
dev-python/platformdirs: Sync with Gentoo
Oct 12, 2026
8ef8f9f
dev-python/pluggy: Sync with Gentoo
Oct 12, 2026
9560c67
dev-python/poetry-core: Sync with Gentoo
Oct 12, 2026
5a4e574
dev-python/pycparser: Sync with Gentoo
Oct 12, 2026
6f0e386
dev-python/pygments: Sync with Gentoo
Oct 12, 2026
9958268
dev-python/pyproject-hooks: Sync with Gentoo
Oct 12, 2026
f69bf19
dev-python/setuptools: Sync with Gentoo
Oct 12, 2026
9b54fb0
dev-python/setuptools-scm: Sync with Gentoo
Oct 12, 2026
cdafe4b
dev-python/six: Sync with Gentoo
Oct 12, 2026
45a27f9
dev-python/snakeoil: Sync with Gentoo
Oct 12, 2026
931916e
dev-python/tomli: Sync with Gentoo
Oct 12, 2026
ca7db59
dev-python/tomli-w: Sync with Gentoo
Oct 12, 2026
46822d4
dev-python/tomlkit: Sync with Gentoo
Oct 12, 2026
8980f57
dev-python/tree-sitter: Sync with Gentoo
Oct 12, 2026
4a6e959
dev-python/trove-classifiers: Sync with Gentoo
Oct 12, 2026
2b3e919
dev-python/typing-extensions: Sync with Gentoo
Oct 12, 2026
2ceb376
dev-python/urllib3: Sync with Gentoo
Oct 12, 2026
c2945b3
dev-python/vcs-versioning: Sync with Gentoo
Oct 12, 2026
3b2ca21
dev-python/wheel: Sync with Gentoo
Oct 12, 2026
2e81dae
dev-util/maturin: Sync with Gentoo
Oct 12, 2026
54aa315
dev-util/pahole: Sync with Gentoo
Oct 12, 2026
0f815bf
dev-util/patchelf: Sync with Gentoo
Oct 12, 2026
5a6da9e
dev-util/pkgcheck: Sync with Gentoo
Oct 12, 2026
6e417d5
dev-util/xdelta: Sync with Gentoo
Oct 12, 2026
af6fb81
dev-vcs/git: Sync with Gentoo
Oct 12, 2026
96034d8
eclass/acct-group: Sync with Gentoo
Oct 12, 2026
b033c21
eclass/acct-user: Sync with Gentoo
Oct 12, 2026
3221edc
eclass/autotools: Sync with Gentoo
Oct 12, 2026
48a552f
eclass/cargo: Sync with Gentoo
Oct 12, 2026
0b299bd
eclass/distutils-r1: Sync with Gentoo
Oct 12, 2026
1096e3f
eclass/edo: Sync with Gentoo
Oct 12, 2026
7737109
eclass/python-utils-r1: Sync with Gentoo
Oct 12, 2026
9fa1d7c
eclass/qmake-utils: Sync with Gentoo
Oct 12, 2026
c300264
eclass/shell-completion: Sync with Gentoo
Oct 12, 2026
7d58a66
eclass/tree-sitter-grammar: Sync with Gentoo
Oct 12, 2026
817b29c
eclass/verify-sig: Sync with Gentoo
Oct 12, 2026
70ef5f3
licenses: Sync with Gentoo
Oct 12, 2026
72cdfcc
net-analyzer/tcpdump: Sync with Gentoo
Oct 12, 2026
bcfaee1
net-dns/bind: Sync with Gentoo
Oct 12, 2026
f771a44
net-dns/dnsmasq: Sync with Gentoo
Oct 12, 2026
fb19b94
net-firewall/ipset: Sync with Gentoo
Oct 12, 2026
accf077
net-firewall/nftables: Sync with Gentoo
Oct 12, 2026
84a4c15
net-fs/cifs-utils: Sync with Gentoo
Oct 12, 2026
99d9487
net-fs/nfs-utils: Sync with Gentoo
Oct 12, 2026
fd599f3
net-fs/samba: Sync with Gentoo
Oct 12, 2026
1caf99f
net-libs/libnftnl: Sync with Gentoo
Oct 12, 2026
6066480
net-libs/libpsl: Sync with Gentoo
Oct 12, 2026
810f15f
net-libs/nghttp2: Sync with Gentoo
Oct 12, 2026
c87f5b9
net-libs/ngtcp2: Sync with Gentoo
Oct 12, 2026
3e407b9
net-misc/chrony: Sync with Gentoo
Oct 12, 2026
0380ab5
net-misc/curl: Sync with Gentoo
Oct 12, 2026
0a7ed18
net-misc/iperf: Sync with Gentoo
Oct 12, 2026
4266a72
net-misc/openssh: Sync with Gentoo
Oct 12, 2026
7e2049a
net-misc/passt: Sync with Gentoo
Oct 12, 2026
e0ffb9a
net-misc/rsync: Sync with Gentoo
Oct 12, 2026
63bb2ce
net-misc/wget: Sync with Gentoo
Oct 12, 2026
11e9ad0
net-vpn/wireguard-tools: Sync with Gentoo
Oct 12, 2026
99f1cd2
profiles: Sync with Gentoo
Oct 12, 2026
268f1ea
sys-apps/bubblewrap: Sync with Gentoo
Oct 12, 2026
9feaa26
sys-apps/busybox: Sync with Gentoo
Oct 12, 2026
9cee21b
sys-apps/coreutils: Sync with Gentoo
Oct 12, 2026
ec1e660
sys-apps/dbus: Sync with Gentoo
Oct 12, 2026
4113a05
sys-apps/groff: Sync with Gentoo
Oct 12, 2026
58f68a4
sys-apps/iproute2: Sync with Gentoo
Oct 12, 2026
27b7bf6
sys-apps/less: Sync with Gentoo
Oct 12, 2026
105bc96
sys-apps/man-pages: Sync with Gentoo
Oct 12, 2026
97e799b
sys-apps/pcsc-lite: Sync with Gentoo
Oct 12, 2026
79ea7c3
sys-apps/pkgcore: Sync with Gentoo
Oct 12, 2026
4efaf17
sys-apps/portage: Sync with Gentoo
Oct 12, 2026
aff9cd9
sys-apps/pv: Sync with Gentoo
Oct 12, 2026
a9b7e2a
sys-apps/shadow: Sync with Gentoo
Oct 12, 2026
f03113c
sys-apps/systemd: Sync with Gentoo
Oct 12, 2026
8c52152
sys-apps/util-linux: Sync with Gentoo
Oct 12, 2026
3b1642c
sys-auth/pambase: Sync with Gentoo
Oct 12, 2026
3b00b3d
sys-auth/sssd: Sync with Gentoo
Oct 12, 2026
896f50f
sys-block/thin-provisioning-tools: Sync with Gentoo
Oct 12, 2026
d038813
sys-boot/grub: Sync with Gentoo
Oct 12, 2026
42b910e
sys-devel/binutils: Sync with Gentoo
Oct 12, 2026
58bfcb2
sys-devel/crossdev: Sync with Gentoo
Oct 12, 2026
5d9e42d
sys-devel/dwz: Sync with Gentoo
Oct 12, 2026
3d01cb7
sys-devel/gcc: Sync with Gentoo
Oct 12, 2026
d6da7d9
sys-firmware/intel-microcode: Sync with Gentoo
Oct 12, 2026
5adbd7a
sys-fs/fuse: Sync with Gentoo
Oct 12, 2026
7cff9a9
sys-fs/inotify-tools: Sync with Gentoo
Oct 12, 2026
e1f0370
sys-fs/xfsprogs: Sync with Gentoo
Oct 12, 2026
ed21c24
sys-libs/binutils-libs: Sync with Gentoo
Oct 12, 2026
0970ff0
sys-libs/glibc: Sync with Gentoo
Oct 12, 2026
c712e29
sys-libs/libcap-ng: Sync with Gentoo
Oct 12, 2026
8920fd2
sys-libs/libunwind: Sync with Gentoo
Oct 12, 2026
f9862df
sys-libs/liburing: Sync with Gentoo
Oct 12, 2026
f4cac17
sys-libs/libxcrypt: Sync with Gentoo
Oct 12, 2026
e57c0db
sys-libs/ncurses: Sync with Gentoo
Oct 12, 2026
763e0ed
sys-libs/readline: Sync with Gentoo
Oct 12, 2026
fb13551
sys-libs/talloc: Sync with Gentoo
Oct 12, 2026
9138fe8
sys-libs/tevent: Sync with Gentoo
Oct 12, 2026
9ca5d1c
sys-libs/timezone-data: Sync with Gentoo
Oct 12, 2026
af35143
sys-process/audit: Sync with Gentoo
Oct 12, 2026
94b9b4d
sys-process/procps: Sync with Gentoo
Oct 12, 2026
37bc1b8
virtual/acl: Sync with Gentoo
Oct 12, 2026
cd50c6a
virtual/editor: Sync with Gentoo
Oct 12, 2026
0bd9250
virtual/libpcre2-internals: Sync with Gentoo
Oct 12, 2026
e1f8742
virtual/perl-Encode: Sync with Gentoo
Oct 12, 2026
4fe45ad
virtual/perl-ExtUtils-MakeMaker: Sync with Gentoo
Oct 12, 2026
97647a4
virtual/tmpfiles: Sync with Gentoo
Oct 12, 2026
99a2a73
x11-drivers/nvidia-drivers: Sync with Gentoo
Oct 12, 2026
b1f976f
x11-misc/makedepend: Sync with Gentoo
Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"

KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"

BDEPEND="verify-sig? ( sec-keys/openpgp-keys-cgzones )"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff --git a/src/sudo.c b/src/sudo.c
index 0ed053839..89d97b6e8 100644
--- a/src/sudo.c
+++ b/src/sudo.c
@@ -341,13 +341,48 @@ access_denied:
return EXIT_FAILURE;
}

+/*
+ * Set the time zone using tzset(3), removing the user's TZ
+ * environment variable. The original value of TZ may still
+ * be present in the command's environment, depending on sudoers.
+ */
+static void
+set_time_zone(void)
+{
+ /* Use system time zone, not user-specified. */
+ unsetenv("TZ");
+ (void) tzset();
+}
+
int
os_init_common(int argc, char *argv[], char *envp[])
{
+ extern char **environ;
+ int envc;
#ifdef STATIC_SUDOERS_PLUGIN
preload_static_symbols();
#endif
gc_init();
+
+ /*
+ * Make a copy of environ[] that is distinct from envp[].
+ * This allows us to remove variables from sudo's environment
+ * while still providing the original envp to the plugins.
+ */
+ for (envc = 0; envp[envc] != NULL; envc++)
+ continue;
+ if (envc != 0) {
+ char **new_env = reallocarray(NULL, sizeof(char *), envc + 1);
+ if (new_env == NULL || !gc_add(GC_PTR, new_env)) {
+ sudo_fatalx_nodebug(U_("%s: %s"), __func__,
+ U_("unable to allocate memory"));
+ }
+ for (envc = 0; envp[envc] != NULL; envc++)
+ new_env[envc] = envp[envc];
+ new_env[envc] = NULL;
+ environ = new_env;
+ }
+
return 0;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit pam tmpfiles toolchain-funcs

MY_P="${P/_/}"
MY_P="${MY_P/beta/b}"

DESCRIPTION="Allows users or groups to run commands as other users"
HOMEPAGE="https://www.sudo.ws/"

if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="
https://github.com/sudo-project/sudo
https://git.sudo.ws/sudo
"
inherit autotools git-r3
else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sudo.ws.asc
inherit libtool verify-sig

uri_prefix=
case ${P} in
*_beta*|*_rc*) uri_prefix=beta/ ;;
esac

SRC_URI="
https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
verify-sig? (
https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz.sig
)
"

if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi

BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )"
fi

S="${WORKDIR}/${MY_P}"

# Basic license is ISC-style as-is, some files are released under
# 3-clause BSD license
LICENSE="ISC BSD"
SLOT="0"
IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"

DEPEND="
virtual/zlib:=
virtual/libcrypt:=
gcrypt? ( dev-libs/libgcrypt:= )
ldap? (
>=net-nds/openldap-2.1.30-r1:=
sasl? (
dev-libs/cyrus-sasl
net-nds/openldap:=[sasl]
)
)
pam? ( sys-libs/pam )
sasl? ( dev-libs/cyrus-sasl )
selinux? ( sys-libs/libselinux )
skey? ( >=sys-auth/skey-1.1.5-r1 )
ssl? ( dev-libs/openssl:= )
sssd? ( sys-auth/sssd[sudo(+)] )
"
RDEPEND="
${DEPEND}
>=app-misc/editor-wrapper-3
virtual/editor
ldap? ( dev-lang/perl )
pam? ( sys-auth/pambase )
selinux? ( sec-policy/selinux-sudo )
sendmail? ( virtual/mta )
"
BDEPEND+="
app-alternatives/yacc
virtual/pkgconfig
"

REQUIRED_USE="
?? ( pam skey )
?? ( gcrypt ssl )
"

MAKEOPTS+=" SAMPLES="

PATCHES=(
"${FILESDIR}/CVE-2026-96512.patch"
)

src_prepare() {
default

if [[ ${PV} == 9999 ]] ; then
eautoreconf
else
elibtoolize
fi
}

set_secure_path() {
# First extract the default ROOTPATH from build env
SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}")

case "${SECURE_PATH}" in
*/usr/sbin*)
;;
*)
SECURE_PATH=$(unset PATH; . "${EPREFIX}"/etc/profile.env; echo "${PATH}")
;;
esac

if [[ -z ${SECURE_PATH} ]] ; then
ewarn " Failed to detect SECURE_PATH, please report this"
fi

# Then remove duplicate path entries
cleanpath() {
local newpath thisp IFS=:
for thisp in $1 ; do
if [[ :${newpath}: != *:${thisp}:* ]] ; then
newpath+=:${thisp}
else
einfo " Duplicate entry ${thisp} removed..."
fi
done
SECURE_PATH=${newpath#:}
}
cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}}

# Finally, strip gcc paths, bug #136027
rmpath() {
local e newpath thisp IFS=:
for thisp in ${SECURE_PATH} ; do
for e ; do
[[ ${thisp} == ${e} ]] && continue 2 ;
done
newpath+=:${thisp}
done
SECURE_PATH=${newpath#:}
}
rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
}

src_configure() {
local SECURE_PATH

set_secure_path

# bug #767712
tc-export PKG_CONFIG

# - audit: somebody got to explain me how I can test this before I
# enable it.. - Diego
# - plugindir: autoconf code is crappy and does not delay evaluation
# until `make` time, so we have to use a full path here rather than
# basing off other values.
local myeconfargs=(
# We set all of the relevant options by ourselves (patched
# into the toolchain) and setting these in the build system
# actually causes a downgrade when using e.g. -D_FORTIFY_SOURCE=3
# (it'll downgrade to =2). So, this has no functional effect on
# the hardening for users. It's safe.
--disable-hardening

# requires some python eclass
--disable-python
--enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d
--enable-zlib=system
--with-editor="${EPREFIX}"/usr/libexec/editor
--with-env-editor
--with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo
--with-rundir="${EPREFIX}"/run/sudo
--with-vardir="${EPREFIX}"/var/db/sudo
--without-linux-audit
--without-opie
$(use_enable gcrypt)
$(use_enable nls)
$(use_enable sasl)
$(use_enable ssl openssl)
$(use_with ldap)
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo)
$(use_with offensive insults)
$(use_with offensive all-insults)
$(use_with pam)
$(use_with pam pam-login)
$(use_with secure-path)
"$(use_with secure-path secure-path-value "${SECURE_PATH}")"
$(use_with selinux)
$(use_with sendmail)
$(use_with skey)
$(use_with sssd)
)

econf "${myeconfargs[@]}"
}

src_install() {
default

if use ldap ; then
dodoc README.LDAP.md

cat <<-EOF > "${T}"/ldap.conf.sudo
# See ldap.conf(5) and README.LDAP.md for details
# This file should only be readable by root

# supported directives: host, port, ssl, ldap_version
# uri, binddn, bindpw, sudoers_base, sudoers_debug
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key}
EOF

if use sasl ; then
cat <<-EOF >> "${T}"/ldap.conf.sudo

# SASL directives: use_sasl, sasl_mech, sasl_auth_id
# sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname
EOF
fi

insinto /etc
doins "${T}"/ldap.conf.sudo
fperms 0440 /etc/ldap.conf.sudo

insinto /etc/openldap/schema
newins docs/schema.OpenLDAP sudo.schema
fi

if use pam ; then
pamd_mimic system-auth sudo auth account session
pamd_mimic system-auth sudo-i auth account session
fi

keepdir /var/db/sudo/lectured
fperms 0700 /var/db/sudo/lectured
# bug #652958
fperms 0711 /var/db/sudo

# Don't install into /run as that is a tmpfs most of the time
# (bug #504854)
rm -rf "${ED}"/run || die

# bug #697812
find "${ED}" -type f -name "*.la" -delete || die
}

pkg_postinst() {
tmpfiles_process sudo.conf

# bug #652958
local sudo_db="${EROOT}/var/db/sudo"
if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
chmod 711 "${sudo_db}" || die
fi

if use ldap ; then
ewarn
ewarn "sudo uses the ${ROOT}/etc/ldap.conf.sudo file for ldap configuration."
ewarn
if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
ewarn "configured in ${ROOT}/etc/nsswitch.conf."
ewarn
ewarn "To make use of LDAP, add this line to your ${ROOT}/etc/nsswitch.conf:"
ewarn " sudoers: ldap files"
ewarn
fi
fi
if use prefix ; then
ewarn
ewarn "To use sudo on Prefix, you need to change file ownership and permissions"
ewarn "with root privileges, as follows:"
ewarn
ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo"
ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so"
ewarn " # chown root:root ${EPREFIX}/etc/sudoers"
ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d"
ewarn " # chown root:root ${EPREFIX}/var/db/sudo"
ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo"
ewarn
fi

elog "To use the -A (askpass) option, you need to install a compatible"
elog "password program from the following list. Starred packages will"
elog "automatically register for the use with sudo (but will not force"
elog "the -A option):"
elog ""
elog " [*] net-misc/ssh-askpass-fullscreen"
elog " net-misc/x11-ssh-askpass"
elog ""
elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
elog "variable to the program you want to use."
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
DIST gzip-1.14.tar.xz 885748 BLAKE2B 32f7241bd9f3b7f73a59905a5bc9abf4e360e787f692cbb00ad28d48abee52744846d10c07ce2f7aaa3e66bc4b6ab9cd4f1b8e98854bb7d1ec010ae0d5146932 SHA512 82aef53188b3e69b51b7ddab5b8c44a11a5b73c0039b22a315a0c7d244694feab0146748add4265901eb1b4c0cee8a9eb69594995f098830d964091af97079c5
DIST gzip-1.14.tar.xz.sig 833 BLAKE2B a13ade68035fe32d69c24a1b5791ae6d7163cbbbebda396b4c773f2dc82ea6c619a44c39adc53dcd8fff094962a1c2dddfabfc7ec2cf54561202ef9a2be325ae SHA512 a5abd09e3b7bda8d87e5af7d2bd943e6021272cb0b6aa05625ddfeae45838aede1ffd91d7e0cb4e170f7f3078035f735f8441bc15cc115c51d302e0a11be44cf
DIST gzip-1.14_p20260502.tar.xz 829092 BLAKE2B fc98853530b4c0e52f1276cf07969acaa42434773d62375d4048fe17b5984ae316ffb8d0ffa949bb5e772adbcab477a79890fc79f1ac4387dd9b2d5e29c337be SHA512 5507ea6ac68ed7c0f4eaf17e6016800a6df597aa9015f91b5c1ca1422f9edd0a8b714c29e7678bfa57a2f45f220ae2ca4e94f1d3dff2b2a7a2cd602e93b364ef
DIST gzip-1.14_p20260502.tar.xz.sig 833 BLAKE2B 13c0c9f39f8ff3e210a772c0ce83bfb2f9f2fabf73ea505dd4f16b80be8b8c3c1eb8f8916ee71c1ac1d562c71a5ca6d6fa522b4624b16e7a6eb67c654f66cd70 SHA512 48816f0d47e44e13b841937f70a4479a5a912ad1bf150640c8e157010853381806af2a1ba8959eced17c630abf9ae6e22f041bb4bed856a6b93f213b3210378a
DIST gzip-1.14_p20260901.tar.xz 834840 BLAKE2B e78aff73b626d3a68ac84ebe590a6a2d67c106aaf7a7ffe1195131322f9ce3fe5fc35a12de4950b29bda4aaf684f8e829425e79186b525544b2c7e0abac45bec SHA512 b2ff6352f819c14de98e87ab5ce54d21b6201d3a00c90163ca769cd72de6a636a8d50b7576e63a963f219820605a43e3744dbfca251f6755f8d62de75575b55a
DIST gzip-1.14_p20260901.tar.xz.sig 833 BLAKE2B 503c5ab9607658fa48ce857155563a0b264d2a398b84e2814cb537bb9d351471dd86743ec98b60f17f76b2365edd785363709e2883a540661d5f93b358a11857 SHA512 35c78a77f2f40e330f5950e028452e488f2758347e3c09b711c540a9bf1f4d289e617b07060b39c640f79827a321f5ed9f2c72d1791b6e4a98678ca1ed96e3a9
DIST gzip-1.15.tar.xz 808900 BLAKE2B efa81df3df766502c5ffde551570b568c73d3b2ad0b2c76bd79b0ed5cea4deb5e0a3d803b942a078efdc4df9cde355863aadc51752498a9e7dec8737be559850 SHA512 4a2ff92df8a49e1bbcbf65c3a70434660ad02f084d1b453f7dcaa8ee84f248cc4bb06f62bd8e57fea1e05ba1275c7c584ce97a58856e4ca6105f6417c8efbc3c
DIST gzip-1.15.tar.xz.sig 833 BLAKE2B 76876e384194c5d4ea4f57932395d8ceecfea0a8c1b221b85fd4b2087d2acc9298a88ea0d9f257f61eb05dd691caf6cb5f20520a678f3d457140413f328424a1 SHA512 11876f760d3867fabe4e104b0adb4f08c9867b2470f6428dedd8a4f5eb68160e4f8410a46d397e7596afc99b562eab4381f197ede5305c9cca401d122c2583c2
Loading