summaryrefslogtreecommitdiffstats
path: root/src/providers/ad/ad_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ad/ad_common.c')
-rw-r--r--src/providers/ad/ad_common.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/providers/ad/ad_common.c b/src/providers/ad/ad_common.c
index 88f36f8ea..7d46af4a4 100644
--- a/src/providers/ad/ad_common.c
+++ b/src/providers/ad/ad_common.c
@@ -1237,6 +1237,14 @@ ad_get_dom_ldap_conn(struct ad_id_ctx *ad_ctx, struct sss_domain_info *dom)
subdom_id_ctx = talloc_get_type(sdom->pvt, struct ad_id_ctx);
conn = subdom_id_ctx->ldap_ctx;
+ if (IS_SUBDOMAIN(sdom->dom) == true && conn != NULL) {
+ /* Regardless of connection types, a subdomain error must not be
+ * allowed to set the whole back end offline, rather report an error
+ * and let the caller deal with it (normally disable the subdomain
+ */
+ conn->ignore_mark_offline = true;
+ }
+
return conn;
}
@@ -1261,3 +1269,21 @@ ad_gc_conn_list(TALLOC_CTX *mem_ctx, struct ad_id_ctx *ad_ctx,
return clist;
}
+
+struct sdap_id_conn_ctx **
+ad_ldap_conn_list(TALLOC_CTX *mem_ctx,
+ struct ad_id_ctx *ad_ctx,
+ struct sss_domain_info *dom)
+{
+ struct sdap_id_conn_ctx **clist;
+
+ clist = talloc_zero_array(mem_ctx, struct sdap_id_conn_ctx *, 2);
+ if (clist == NULL) {
+ return NULL;
+ }
+
+ clist[0] = ad_get_dom_ldap_conn(ad_ctx, dom);
+
+ clist[1] = NULL;
+ return clist;
+}