|
|
905b4d |
From 943d1b32aeb8cbddccbe3a499504ec07955937b5 Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
905b4d |
Date: Thu, 30 Oct 2014 17:38:19 +0100
|
|
|
905b4d |
Subject: [PATCH 178/181] IPA: Rename user_dom into obj_dom
|
|
|
905b4d |
|
|
|
905b4d |
There was a variable in the IPA subdomain code named user_dom, however,
|
|
|
905b4d |
it was used in code that processes both users and groups, which was
|
|
|
905b4d |
confusing.
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Pavel Reichl <preichl@redhat.com>
|
|
|
905b4d |
---
|
|
|
905b4d |
src/providers/ipa/ipa_subdomains_id.c | 24 ++++++++++++------------
|
|
|
905b4d |
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
|
|
|
905b4d |
index cf0cddf6884295268b30fc8e0209b543c1699297..79285548d9470b34d66b366367fb69ef57710f83 100644
|
|
|
905b4d |
--- a/src/providers/ipa/ipa_subdomains_id.c
|
|
|
905b4d |
+++ b/src/providers/ipa/ipa_subdomains_id.c
|
|
|
905b4d |
@@ -539,7 +539,7 @@ struct ipa_get_ad_acct_state {
|
|
|
905b4d |
struct ipa_id_ctx *ipa_ctx;
|
|
|
905b4d |
struct be_req *be_req;
|
|
|
905b4d |
struct be_acct_req *ar;
|
|
|
905b4d |
- struct sss_domain_info *user_dom;
|
|
|
905b4d |
+ struct sss_domain_info *obj_dom;
|
|
|
905b4d |
char *object_sid;
|
|
|
905b4d |
struct sysdb_attrs *override_attrs;
|
|
|
905b4d |
struct ldb_message *obj_msg;
|
|
|
905b4d |
@@ -581,15 +581,15 @@ ipa_get_ad_acct_send(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
state->override_attrs = override_attrs;
|
|
|
905b4d |
|
|
|
905b4d |
/* This can only be a subdomain request, verify subdomain */
|
|
|
905b4d |
- state->user_dom = find_domain_by_name(ipa_ctx->sdap_id_ctx->be->domain,
|
|
|
905b4d |
- ar->domain, true);
|
|
|
905b4d |
- if (state->user_dom == NULL) {
|
|
|
905b4d |
+ state->obj_dom = find_domain_by_name(ipa_ctx->sdap_id_ctx->be->domain,
|
|
|
905b4d |
+ ar->domain, true);
|
|
|
905b4d |
+ if (state->obj_dom == NULL) {
|
|
|
905b4d |
ret = EINVAL;
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
/* Let's see if this subdomain has a ad_id_ctx */
|
|
|
905b4d |
- ad_id_ctx = ipa_get_ad_id_ctx(ipa_ctx, state->user_dom);
|
|
|
905b4d |
+ ad_id_ctx = ipa_get_ad_id_ctx(ipa_ctx, state->obj_dom);
|
|
|
905b4d |
if (ad_id_ctx == NULL) {
|
|
|
905b4d |
ret = EINVAL;
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
@@ -604,7 +604,7 @@ ipa_get_ad_acct_send(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
switch (state->ar->entry_type & BE_REQ_TYPE_MASK) {
|
|
|
905b4d |
case BE_REQ_INITGROUPS:
|
|
|
905b4d |
case BE_REQ_GROUP:
|
|
|
905b4d |
- clist = ad_gc_conn_list(req, ad_id_ctx, state->user_dom);
|
|
|
905b4d |
+ clist = ad_gc_conn_list(req, ad_id_ctx, state->obj_dom);
|
|
|
905b4d |
if (clist == NULL) {
|
|
|
905b4d |
ret = ENOMEM;
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
@@ -621,7 +621,7 @@ ipa_get_ad_acct_send(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
/* Now we already need ad_id_ctx in particular sdap_id_conn_ctx */
|
|
|
905b4d |
- sdom = sdap_domain_get(sdap_id_ctx->opts, state->user_dom);
|
|
|
905b4d |
+ sdom = sdap_domain_get(sdap_id_ctx->opts, state->obj_dom);
|
|
|
905b4d |
if (sdom == NULL) {
|
|
|
905b4d |
ret = EIO;
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
@@ -988,7 +988,7 @@ ipa_get_ad_acct_ad_part_done(struct tevent_req *subreq)
|
|
|
905b4d |
return;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
- ret = get_object_from_cache(state, state->user_dom, state->ar,
|
|
|
905b4d |
+ ret = get_object_from_cache(state, state->obj_dom, state->ar,
|
|
|
905b4d |
&state->obj_msg);
|
|
|
905b4d |
if (ret == ENOENT) {
|
|
|
905b4d |
DEBUG(SSSDBG_MINOR_FAILURE, "Object not found, ending request\n");
|
|
|
905b4d |
@@ -999,7 +999,7 @@ ipa_get_ad_acct_ad_part_done(struct tevent_req *subreq)
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
- ret = apply_subdomain_homedir(state, state->user_dom,
|
|
|
905b4d |
+ ret = apply_subdomain_homedir(state, state->obj_dom,
|
|
|
905b4d |
state->obj_msg);
|
|
|
905b4d |
if (ret != EOK && ret != ENOENT) {
|
|
|
905b4d |
DEBUG(SSSDBG_OP_FAILURE,
|
|
|
905b4d |
@@ -1024,7 +1024,7 @@ ipa_get_ad_acct_ad_part_done(struct tevent_req *subreq)
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
ret = get_be_acct_req_for_sid(state, state->object_sid,
|
|
|
905b4d |
- state->user_dom->name, &ar);
|
|
|
905b4d |
+ state->obj_dom->name, &ar);
|
|
|
905b4d |
if (ret != EOK) {
|
|
|
905b4d |
DEBUG(SSSDBG_OP_FAILURE, "get_be_acct_req_for_sid failed.\n");
|
|
|
905b4d |
goto fail;
|
|
|
905b4d |
@@ -1103,7 +1103,7 @@ static errno_t ipa_get_ad_apply_override_step(struct tevent_req *req)
|
|
|
905b4d |
if (state->override_attrs != NULL) {
|
|
|
905b4d |
/* We are in ipa-server-mode, so the view is the default view by
|
|
|
905b4d |
* definition. */
|
|
|
905b4d |
- ret = sysdb_apply_default_override(state->user_dom,
|
|
|
905b4d |
+ ret = sysdb_apply_default_override(state->obj_dom,
|
|
|
905b4d |
state->override_attrs,
|
|
|
905b4d |
state->obj_msg->dn);
|
|
|
905b4d |
if (ret != EOK) {
|
|
|
905b4d |
@@ -1121,7 +1121,7 @@ static errno_t ipa_get_ad_apply_override_step(struct tevent_req *req)
|
|
|
905b4d |
* users. */
|
|
|
905b4d |
subreq = ipa_get_ad_memberships_send(state, state->ev, state->ar,
|
|
|
905b4d |
state->ipa_ctx->server_mode,
|
|
|
905b4d |
- state->user_dom,
|
|
|
905b4d |
+ state->obj_dom,
|
|
|
905b4d |
state->ipa_ctx->sdap_id_ctx,
|
|
|
905b4d |
state->ipa_ctx->server_mode->realm);
|
|
|
905b4d |
if (subreq == NULL) {
|
|
|
905b4d |
--
|
|
|
905b4d |
2.1.0
|
|
|
905b4d |
|