Blame SOURCES/0190-ad_account_can_shortcut-shortcut-if-ID-is-unknown.patch

8974b2
From 55e8b436443cfae1c3b2155be7325d53760f7271 Mon Sep 17 00:00:00 2001
8974b2
From: Sumit Bose <sbose@redhat.com>
8974b2
Date: Thu, 20 Jul 2017 20:01:14 +0200
8974b2
Subject: [PATCH 190/190] ad_account_can_shortcut: shortcut if ID is unknown
8974b2
MIME-Version: 1.0
8974b2
Content-Type: text/plain; charset=UTF-8
8974b2
Content-Transfer-Encoding: 8bit
8974b2
8974b2
If sss_idmap_unix_to_sid() returns an error we can assume that the given
8974b2
POSIX ID is not from the current domain and can be skipped. This is e.g.
8974b2
the case in the IPA provider if a POSIX ID used in the IPA domain is
8974b2
checked in a trusted id-mapped AD domain before the IPA domain is
8974b2
checked.
8974b2
8974b2
Resolves https://pagure.io/SSSD/sssd/issue/3452
8974b2
8974b2
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
8974b2
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
8974b2
---
8974b2
 src/providers/ad/ad_id.c | 2 ++
8974b2
 1 file changed, 2 insertions(+)
8974b2
8974b2
diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c
8974b2
index d1f6c444f5ddbcbbac6ff7f41fb6c8bf9ca976cb..e14ada386f16851a65097952c85e57b7acda14aa 100644
8974b2
--- a/src/providers/ad/ad_id.c
8974b2
+++ b/src/providers/ad/ad_id.c
8974b2
@@ -86,6 +86,8 @@ static bool ad_account_can_shortcut(struct sdap_idmap_ctx *idmap_ctx,
8974b2
         if (err != IDMAP_SUCCESS) {
8974b2
             DEBUG(SSSDBG_MINOR_FAILURE, "Mapping ID [%s] to SID failed: "
8974b2
                   "[%s]\n", filter_value, idmap_error_string(err));
8974b2
+            /* assume id is from a different domain */
8974b2
+            shortcut = true;
8974b2
             goto done;
8974b2
         }
8974b2
         /* fall through */
8974b2
-- 
8974b2
2.9.4
8974b2