diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2021-01-30 11:18:50 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2021-01-30 11:18:50 +0100 |
commit | e3dea34c197901b5d40aa0683ee9c0473ab62b9c (patch) | |
tree | 636243ff7dfc9bed361538a45a12ab5e27cdb828 /app-admin/sudo | |
parent | app-forensics/chkrootkit: Stabilize 0.54 ppc64, #767931 (diff) | |
download | gentoo-e3dea34c197901b5d40aa0683ee9c0473ab62b9c.tar.gz gentoo-e3dea34c197901b5d40aa0683ee9c0473ab62b9c.tar.bz2 gentoo-e3dea34c197901b5d40aa0683ee9c0473ab62b9c.zip |
app-admin/sudo: Revbump to fix NO_ROOT_MAILER issue
Removed old. Bumped straight to stable.
Bug: https://bugs.gentoo.org/767946
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin/sudo')
-rw-r--r-- | app-admin/sudo/files/sudo-1.9.5_p2-NO_ROOT_MAILER_fix.patch | 51 | ||||
-rw-r--r-- | app-admin/sudo/sudo-1.9.5_p2-r1.ebuild (renamed from app-admin/sudo/sudo-1.9.5_p2.ebuild) | 4 |
2 files changed, 55 insertions, 0 deletions
diff --git a/app-admin/sudo/files/sudo-1.9.5_p2-NO_ROOT_MAILER_fix.patch b/app-admin/sudo/files/sudo-1.9.5_p2-NO_ROOT_MAILER_fix.patch new file mode 100644 index 000000000000..7cae441cbcff --- /dev/null +++ b/app-admin/sudo/files/sudo-1.9.5_p2-NO_ROOT_MAILER_fix.patch @@ -0,0 +1,51 @@ + +# HG changeset patch +# User Todd C. Miller <Todd.Miller@sudo.ws> +# Date 1611924154 25200 +# Node ID e0d4f196ba027604154f79ddd03a0b90f90c9607 +# Parent cd1c7615e861083e9e9b61d0e0070354e227ea5c +Fix NO_ROOT_MAILER, broken by the eventlog refactor in sudo 1.9.4. +init_eventlog_config() is called immediately after initializing the +Defaults settings, which is before struct sudo_user is setup. This +adds a call to eventlog_set_mailuid() if NO_ROOT_MAILER is defined +after the invoking user is determined. Reported by Roman Fiedler. + +diff -r cd1c7615e861 -r e0d4f196ba02 plugins/sudoers/logging.c +--- a/plugins/sudoers/logging.c Tue Dec 08 12:35:21 2020 -0700 ++++ b/plugins/sudoers/logging.c Fri Jan 29 05:42:34 2021 -0700 +@@ -786,11 +786,6 @@ + init_eventlog_config(void) + { + int logtype = 0; +-#ifdef NO_ROOT_MAILER +- uid_t mailuid = user_uid; +-#else +- uid_t mailuid = ROOT_UID; +-#endif + debug_decl(init_eventlog_config, SUDOERS_DEBUG_LOGGING); + + if (def_syslog) +@@ -805,7 +800,7 @@ + eventlog_set_syslog_alertpri(def_syslog_badpri); + eventlog_set_syslog_maxlen(def_syslog_maxlen); + eventlog_set_file_maxlen(def_loglinelen); +- eventlog_set_mailuid(mailuid); ++ eventlog_set_mailuid(ROOT_UID); + eventlog_set_omit_hostname(!def_log_host); + eventlog_set_logpath(def_logfile); + eventlog_set_time_fmt(def_log_year ? "%h %e %T %Y" : "%h %e %T"); +diff -r cd1c7615e861 -r e0d4f196ba02 plugins/sudoers/policy.c +--- a/plugins/sudoers/policy.c Tue Dec 08 12:35:21 2020 -0700 ++++ b/plugins/sudoers/policy.c Fri Jan 29 05:42:34 2021 -0700 +@@ -518,6 +518,10 @@ + /* Some systems support fexecve() which we use for digest matches. */ + cmnd_fd = -1; + ++#ifdef NO_ROOT_MAILER ++ eventlog_set_mailuid(user_uid); ++#endif ++ + /* Dump settings and user info (XXX - plugin args) */ + for (cur = info->settings; *cur != NULL; cur++) + sudo_debug_printf(SUDO_DEBUG_INFO, "settings: %s", *cur); + diff --git a/app-admin/sudo/sudo-1.9.5_p2.ebuild b/app-admin/sudo/sudo-1.9.5_p2-r1.ebuild index 183dd7b6ece8..af0d7b0c4bd3 100644 --- a/app-admin/sudo/sudo-1.9.5_p2.ebuild +++ b/app-admin/sudo/sudo-1.9.5_p2-r1.ebuild @@ -74,6 +74,10 @@ REQUIRED_USE=" MAKEOPTS+=" SAMPLES=" +PATCHES=( + "${FILESDIR}/${P}-NO_ROOT_MAILER_fix.patch" #767946 +) + src_prepare() { default elibtoolize |