diff options
Diffstat (limited to 'src/providers/ad/ad_subdomains.c')
-rw-r--r-- | src/providers/ad/ad_subdomains.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c index ac9d8baa1..d889dfb6d 100644 --- a/src/providers/ad/ad_subdomains.c +++ b/src/providers/ad/ad_subdomains.c @@ -598,6 +598,7 @@ static void ad_subdomains_master_dom_done(struct tevent_req *req) { struct ad_subdomains_req_ctx *ctx; errno_t ret; + const char *realm; ctx = tevent_req_callback_data(req, struct ad_subdomains_req_ctx); @@ -610,7 +611,16 @@ static void ad_subdomains_master_dom_done(struct tevent_req *req) goto done; } + realm = dp_opt_get_cstring(ctx->sd_ctx->ad_id_ctx->ad_options->basic, + AD_KRB5_REALM); + if (realm == NULL) { + DEBUG(SSSDBG_CONF_SETTINGS, "Missing realm.\n"); + ret = EINVAL; + goto done; + } + ret = sysdb_master_domain_add_info(ctx->sd_ctx->be_ctx->domain, + realm, ctx->flat_name, ctx->master_sid, ctx->forest); if (ret != EOK) { |