summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2015-12-07 16:57:05 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-12-10 16:05:49 +0100
commit1e6ad2b73851049197c7756787d14c78f64e1128 (patch)
tree717909eed73b8c7c15b2259e583a424b0e068442
parent0741237b3f9209af43d956216b3c2f09b90c4ebc (diff)
downloadsssd-1e6ad2b73851049197c7756787d14c78f64e1128.tar.gz
sssd-1e6ad2b73851049197c7756787d14c78f64e1128.tar.xz
sssd-1e6ad2b73851049197c7756787d14c78f64e1128.zip
LDAP: check early for missing SID in mapping check
Resolves https://fedorahosted.org/sssd/ticket/2830 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r--src/providers/ldap/sdap_idmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_idmap.c b/src/providers/ldap/sdap_idmap.c
index f4a065b0b..d33e5d06d 100644
--- a/src/providers/ldap/sdap_idmap.c
+++ b/src/providers/ldap/sdap_idmap.c
@@ -563,6 +563,12 @@ bool sdap_idmap_domain_has_algorithmic_mapping(struct sdap_idmap_ctx *ctx,
return false;
}
+ /* If there is no SID, e.g. IPA without enabled trust support, we cannot
+ * have algorithmic mapping */
+ if (dom_sid == NULL) {
+ return false;
+ }
+
/* This is the first time we've seen this domain
* Create a new domain for it. We'll use the dom-sid
* as the domain name for now, since we don't have