diff options
Diffstat (limited to 'src/providers/ipa/ipa_s2n_exop.c')
-rw-r--r-- | src/providers/ipa/ipa_s2n_exop.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index 6f8d5687d..35bd303d4 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -1819,6 +1819,17 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom, } } + if (strcmp(dom->name, attrs->domain_name) != 0) { + dom = find_domain_by_name(get_domains_head(dom), + attrs->domain_name, true); + if (dom == NULL) { + DEBUG(SSSDBG_OP_FAILURE, + "Cannot find domain: [%s]\n", attrs->domain_name); + ret = EINVAL; + goto done; + } + } + switch (attrs->response_type) { case RESP_USER: case RESP_USER_GROUPLIST: @@ -2057,17 +2068,6 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom, case RESP_GROUP_MEMBERS: type = SYSDB_MEMBER_GROUP; - if (0 != strcmp(dom->name, attrs->domain_name)) { - dom = find_domain_by_name(get_domains_head(dom), - attrs->domain_name, true); - if (dom == NULL) { - DEBUG(SSSDBG_OP_FAILURE, - "Cannot find domain: [%s]\n", attrs->domain_name); - ret = EINVAL; - goto done; - } - } - if (name == NULL) { name = attrs->a.group.gr_name; } |