dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0092-sbus-use-120-second-default-timeout.patch

71e593
From e4469fbdb3d5c53294c6514280ac75b847b3c61c Mon Sep 17 00:00:00 2001
71e593
From: Adam Williamson <awilliam@redhat.com>
71e593
Date: Wed, 12 Dec 2018 22:28:15 -0800
71e593
Subject: [PATCH] sbus: use 120 second default timeout
71e593
MIME-Version: 1.0
71e593
Content-Type: text/plain; charset=UTF-8
71e593
Content-Transfer-Encoding: 8bit
71e593
71e593
As discussed in #1654537, first login to a system as a FreeIPA
71e593
domain user now usually causes an expensive SELinux operation
71e593
to happen; this can take longer than the default bus message
71e593
timeout of 25 seconds. To deal with this for now, let's use a
71e593
120 second default timeout; this is a big hammer, but unless we
71e593
can refactor things to use a longer timeout just for that one
71e593
call, or make the actual operation take less time, there's not
71e593
much else we can do.
71e593
71e593
Resolves:
71e593
https://bugzilla.redhat.com/show_bug.cgi?id=1654537
71e593
71e593
Resolves:
71e593
https://pagure.io/SSSD/sssd/issue/3909
71e593
71e593
Signed-off-by: Adam Williamson <awilliam@redhat.com>
71e593
71e593
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
71e593
---
71e593
 src/sbus/sbus_message.h | 6 ++++--
71e593
 1 file changed, 4 insertions(+), 2 deletions(-)
71e593
71e593
diff --git a/src/sbus/sbus_message.h b/src/sbus/sbus_message.h
71e593
index e7b8fe594..7ae634ece 100644
71e593
--- a/src/sbus/sbus_message.h
71e593
+++ b/src/sbus/sbus_message.h
71e593
@@ -27,8 +27,10 @@
71e593
 #include "util/util.h"
71e593
 #include "sbus/sbus_errors.h"
71e593
 
71e593
-/* Use reasonable default timeout which is computed in libdbus */
71e593
-#define SBUS_MESSAGE_TIMEOUT -1
71e593
+/* Use longer default timeout than libdbus default due to expensive
71e593
+ * selinux operation: see https://bugzilla.redhat.com/show_bug.cgi?id=1654537
71e593
+ */
71e593
+#define SBUS_MESSAGE_TIMEOUT 120000
71e593
 
71e593
 /**
71e593
  * Bound message with a talloc context.
71e593
-- 
71e593
2.19.1
71e593