summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ad/ad_subdomains.c4
-rw-r--r--src/providers/ipa/ipa_subdomains.c13
2 files changed, 13 insertions, 4 deletions
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index 20aaa2d7..724d0736 100644
--- a/src/providers/ad/ad_subdomains.c
+++ b/src/providers/ad/ad_subdomains.c
@@ -220,7 +220,9 @@ ad_subdom_store(struct ad_subdomains_ctx *ctx,
goto done;
}
- ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, sid_str);
+ /* AD subdomains are currently all mpg */
+ ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, sid_str,
+ true);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_subdomain_store failed.\n"));
goto done;
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 119f44a5..a67526c8 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -23,6 +23,7 @@
*/
#include "providers/ldap/sdap_async.h"
+#include "providers/ldap/sdap_idmap.h"
#include "providers/ipa/ipa_subdomains.h"
#include "providers/ipa/ipa_common.h"
#include <ctype.h>
@@ -232,6 +233,7 @@ done:
}
static errno_t ipa_subdom_store(struct sss_domain_info *domain,
+ struct sdap_idmap_ctx *sdap_idmap_ctx,
struct sysdb_attrs *attrs)
{
TALLOC_CTX *tmp_ctx;
@@ -240,6 +242,7 @@ static errno_t ipa_subdom_store(struct sss_domain_info *domain,
const char *flat;
const char *id;
int ret;
+ bool mpg;
tmp_ctx = talloc_new(domain);
if (tmp_ctx == NULL) {
@@ -270,7 +273,9 @@ static errno_t ipa_subdom_store(struct sss_domain_info *domain,
goto done;
}
- ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, id);
+ mpg = sdap_idmap_domain_has_algorithmic_mapping(sdap_idmap_ctx, id);
+
+ ret = sysdb_subdomain_store(domain->sysdb, name, realm, flat, id, mpg);
if (ret) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_subdomain_store failed.\n"));
goto done;
@@ -323,7 +328,8 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx,
}
} else {
/* ok let's try to update it */
- ret = ipa_subdom_store(domain, reply[c]);
+ ret = ipa_subdom_store(domain, ctx->sdap_id_ctx->opts->idmap_ctx,
+ reply[c]);
if (ret) {
/* Nothing we can do about the errorr. Let's at least try
* to reuse the existing domain
@@ -352,7 +358,8 @@ static errno_t ipa_subdomains_refresh(struct ipa_subdomains_ctx *ctx,
/* Nothing we can do about the errorr. Let's at least try
* to reuse the existing domain.
*/
- ret = ipa_subdom_store(domain, reply[c]);
+ ret = ipa_subdom_store(domain, ctx->sdap_id_ctx->opts->idmap_ctx,
+ reply[c]);
if (ret) {
DEBUG(SSSDBG_MINOR_FAILURE, ("Failed to parse subdom data, "
"will try to use cached subdomain\n"));