dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0050-krb5-assume-online-state-if-KDC-proxy-is-configured.patch

6cf099
From 860b0e5e2f34a270a5e40912fd07efbe093a29f8 Mon Sep 17 00:00:00 2001
6cf099
From: Sumit Bose <sbose@redhat.com>
6cf099
Date: Fri, 31 Jul 2015 11:06:54 +0200
6cf099
Subject: [PATCH 50/57] krb5: assume online state if KDC proxy is configured
6cf099
6cf099
If a KDC proxy is configured a request in the KRB5 provider will assume
6cf099
online state even if the backend is offline without changing the state
6cf099
of the backend.
6cf099
6cf099
Resolves https://fedorahosted.org/sssd/ticket/2700
6cf099
6cf099
Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
6cf099
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
6cf099
---
6cf099
 src/providers/krb5/krb5_auth.c | 6 ++++++
6cf099
 1 file changed, 6 insertions(+)
6cf099
6cf099
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
6cf099
index d1bf4025b052d82413d1f370a36b0b99720d6f05..da8309d0504a6815902513693343a3500f454557 100644
6cf099
--- a/src/providers/krb5/krb5_auth.c
6cf099
+++ b/src/providers/krb5/krb5_auth.c
6cf099
@@ -754,6 +754,12 @@ static void krb5_auth_resolve_done(struct tevent_req *subreq)
6cf099
         kr->is_offline = be_is_offline(state->be_ctx);
6cf099
     }
6cf099
 
6cf099
+    if (kr->is_offline
6cf099
+            && sss_krb5_realm_has_proxy(dp_opt_get_cstring(kr->krb5_ctx->opts,
6cf099
+                                        KRB5_REALM))) {
6cf099
+        kr->is_offline = false;
6cf099
+    }
6cf099
+
6cf099
     subreq = handle_child_send(state, state->ev, kr);
6cf099
     if (subreq == NULL) {
6cf099
         DEBUG(SSSDBG_CRIT_FAILURE, "handle_child_send failed.\n");
6cf099
-- 
6cf099
2.4.3
6cf099