This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: sudo 1.9.8-2: fix custom password prompt (FS#72146)
git-svn-id: file:///srv/repos/svn-packages/svn@424077 eb2447ed-0c53-47e4-bac8-5bc4a241df78
- Loading branch information
foutrelis
authored and
svntogit
committed
Sep 16, 2021
1 parent
7dccd36
commit fb4cc13
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From d7cdf1e47c596c3fa6cffedd4904c67919389668 Mon Sep 17 00:00:00 2001 | ||
From: "Todd C. Miller" <Todd.Miller@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; | ||
} |
fb4cc13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
with Version 1.9.8-1
with Version 1.9.8-2
Thank you!
Klaus.