Accepting request 959556 from home:jsikes:branches:Base:System

Fix for bsc 1193446. Enjoy!

OBS-URL: https://build.opensuse.org/request/show/959556
OBS-URL: https://build.opensuse.org/package/show/Base:System/sudo?expand=0&rev=209
This commit is contained in:
Dirk Mueller 2022-03-07 11:36:16 +00:00 committed by Git OBS Bridge
parent 86ffaf5f6b
commit c9aee8b1e3
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,22 @@
From 1f3815c4fb3f282250ff30626979d224e30b4b05 Mon Sep 17 00:00:00 2001
From: Jaroslav Jindrak <dzejrou@gmail.com>
Date: Wed, 9 Feb 2022 17:37:26 +0100
Subject: [PATCH] Do not unset user timeout when no default timeout is set.
---
plugins/sudoers/policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c
index 26c4be3fe..0482b58dd 100644
--- a/plugins/sudoers/policy.c
+++ b/plugins/sudoers/policy.c
@@ -865,7 +865,7 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
if (def_command_timeout > 0 || user_timeout > 0) {
int timeout = user_timeout;
- if (timeout == 0 || def_command_timeout < timeout)
+ if (timeout == 0 || (def_command_timeout > 0 && def_command_timeout < timeout))
timeout = def_command_timeout;
if (asprintf(&command_info[info_len++], "timeout=%u", timeout) == -1)
goto oom;

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Mar 3 12:00:46 UTC 2022 - Jason Sikes <jsikes@suse.com>
- Add sudo-1.9.9-honor-T_opt.patch
* the -T option of sudo does nothing even when
'Defaults user_command_timeouts' is present in the configuration.
* [bsc#1193446]
* Credit to Jaroslav Jindrak <dzejrou@gmail.com>
-------------------------------------------------------------------
Wed Feb 16 04:34:33 UTC 2022 - Simon Lees <sflees@suse.de>

View File

@ -39,6 +39,7 @@ Source7: README_313276.test
# PATCH-OPENSUSE: the "SUSE" branding of the default sudo config
Patch0: sudo-sudoers.patch
Patch1: feature-upstream-restrict-sudo-U-other-l.patch
Patch2: sudo-1.9.9-honor-T_opt.patch
BuildRequires: audit-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: groff