summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_subdomains_id.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-06-27 17:07:36 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-28 20:20:59 +0200
commitb8d703cf3aba81800cf1b8ccca64bb00ef0b30f7 (patch)
treee406479c4d454d765b86c8a99e0929c198e991dd /src/providers/ipa/ipa_subdomains_id.c
parent5e60c73cb91d1659755fb5ea829837db68d46163 (diff)
downloadsssd-b8d703cf3aba81800cf1b8ccca64bb00ef0b30f7.tar.gz
sssd-b8d703cf3aba81800cf1b8ccca64bb00ef0b30f7.tar.xz
sssd-b8d703cf3aba81800cf1b8ccca64bb00ef0b30f7.zip
Replace new_subdomain() with find_subdomain_by_name()
new_subdomain() will create a new domain object and should not be used anymore in the priovder code directly. Instead a reference to the domain from the common domain object should be used.
Diffstat (limited to 'src/providers/ipa/ipa_subdomains_id.c')
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 7fa09bd98..dc822888f 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -73,12 +73,10 @@ struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
goto fail;
}
- state->domain = new_subdomain(state, state->ctx->be->domain, ar->domain,
- NULL,
- get_flat_name_from_subdomain_name(ctx->be,ar->domain),
- NULL);
+ state->domain = find_subdomain_by_name(state->ctx->be->domain,
+ ar->domain, true);
if (state->domain == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("new_subdomain failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, ("find_subdomain_by_name failed.\n"));
ret = ENOMEM;
goto fail;
}