[arch-commits] Commit in sudo/trunk (PKGBUILD append_defaults-boolean-flags.patch)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Thu Sep 16 04:09:30 UTC 2021
Date: Thursday, September 16, 2021 @ 04:09:30
Author: foutrelis
Revision: 424077
upgpkg: sudo 1.9.8-2: fix custom password prompt (FS#72146)
Added:
sudo/trunk/append_defaults-boolean-flags.patch
Modified:
sudo/trunk/PKGBUILD
-------------------------------------+
PKGBUILD | 6 +++-
append_defaults-boolean-flags.patch | 48 ++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-09-16 02:06:43 UTC (rev 424076)
+++ PKGBUILD 2021-09-16 04:09:30 UTC (rev 424077)
@@ -4,7 +4,7 @@
pkgname=sudo
_sudover=1.9.8
-pkgrel=1
+pkgrel=2
pkgver=${_sudover/p/.p}
pkgdesc="Give certain users the ability to run some commands as root"
arch=('x86_64')
@@ -18,10 +18,12 @@
'etc/sudoers')
install=$pkgname.install
source=(https://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
+ append_defaults-boolean-flags.patch
sudo_logsrvd.service
sudo.pam)
sha256sums=('f1735de999804ea1af068fba6a82cb6674ea64c789813b29266fd3b16cb294e6'
'SKIP'
+ '36648e052a834275636bef75a00197e43cd1baaa07006cd3b426e99cc109b4b9'
'8b91733b73171827c360a3e01f4692772b78e62ceca0cf0fd4b770aba35081a1'
'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2')
validpgpkeys=('59D1E9CCBA2B376704FDD35BA9F4C021CEA470FB')
@@ -28,6 +30,8 @@
prepare() {
cd "$srcdir/$pkgname-$_sudover"
+ # https://bugs.archlinux.org/task/72146
+ patch -Np1 -i ../append_defaults-boolean-flags.patch
}
build() {
Added: append_defaults-boolean-flags.patch
===================================================================
--- append_defaults-boolean-flags.patch (rev 0)
+++ append_defaults-boolean-flags.patch 2021-09-16 04:09:30 UTC (rev 424077)
@@ -0,0 +1,48 @@
+From d7cdf1e47c596c3fa6cffedd4904c67919389668 Mon Sep 17 00:00:00 2001
+From: "Todd C. Miller" <Todd.Miller at sudo.ws>
+Date: Tue, 14 Sep 2021 08:02:37 -0600
+Subject: [PATCH] append_defaults() should not be passed a value for boolean
+ flags. The operation should simply be set to true/false. Also treat a NULL
+ file as coming from the front-end. Bug #993.
+
+---
+ plugins/sudoers/defaults.c | 3 +++
+ plugins/sudoers/policy.c | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c
+index 5739b40e2..95e6fbd30 100644
+--- a/plugins/sudoers/defaults.c
++++ b/plugins/sudoers/defaults.c
+@@ -206,6 +206,9 @@ parse_default_entry(struct sudo_defs_types *def, const char *val, int op,
+ int rc;
+ debug_decl(parse_default_entry, SUDOERS_DEBUG_DEFAULTS);
+
++ if (file == NULL)
++ file = "front-end";
++
+ sudo_debug_printf(SUDO_DEBUG_INFO, "%s: %s:%d:%d: %s=%s op=%d",
+ __func__, file, line, column, def->name, val ? val : "", op);
+
+diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c
+index eb1ce43b7..c8c20735d 100644
+--- a/plugins/sudoers/policy.c
++++ b/plugins/sudoers/policy.c
+@@ -224,7 +224,7 @@ sudoers_policy_deserialize_info(void *v, struct defaults_list *defaults)
+ if (MATCHES(*cur, "prompt=")) {
+ /* Allow epmpty prompt. */
+ user_prompt = *cur + sizeof("prompt=") - 1;
+- if (!append_default("passprompt_override", "true", true, NULL, defaults))
++ if (!append_default("passprompt_override", NULL, true, NULL, defaults))
+ goto oom;
+ continue;
+ }
+@@ -285,7 +285,7 @@ sudoers_policy_deserialize_info(void *v, struct defaults_list *defaults)
+ if (MATCHES(*cur, "login_class=")) {
+ CHECK(*cur, "login_class=");
+ login_class = *cur + sizeof("login_class=") - 1;
+- if (!append_default("use_loginclass", "true", true, NULL, defaults))
++ if (!append_default("use_loginclass", NULL, true, NULL, defaults))
+ goto oom;
+ continue;
+ }
More information about the arch-commits
mailing list