From 95f5e7963a36b7b68859ce91ae4b232088bbaa09 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 21 Sep 2012 23:41:42 +0200 Subject: SYSDB: Remove unnecessary domain parameter from several sysdb calls The domain can be read from the sysdb object. Removing the domain string makes the API more self-contained. --- src/responder/pac/pacsrv_cmd.c | 3 +-- src/responder/pac/pacsrv_utils.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/responder') diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c index 0696caca5..b7edf81d5 100644 --- a/src/responder/pac/pacsrv_cmd.c +++ b/src/responder/pac/pacsrv_cmd.c @@ -293,8 +293,7 @@ struct tevent_req *pac_save_memberships_send(struct pac_req_ctx *pr_ctx) } state->gid_iter = 0; - state->user_dn = sysdb_user_dn(dom->sysdb, state, dom->name, - pr_ctx->user_name); + state->user_dn = sysdb_user_dn(dom->sysdb, state, pr_ctx->user_name); if (state->user_dn == NULL) { ret = ENOMEM; goto done; diff --git a/src/responder/pac/pacsrv_utils.c b/src/responder/pac/pacsrv_utils.c index d4df5b161..7d375873e 100644 --- a/src/responder/pac/pacsrv_utils.c +++ b/src/responder/pac/pacsrv_utils.c @@ -225,7 +225,6 @@ errno_t get_my_domain_data(struct pac_ctx *pac_ctx, struct ldb_message **msgs; TALLOC_CTX *tmp_ctx = NULL; struct dom_sid *sid = NULL; - char *dom_name; enum idmap_error_code err; size_t range_count; struct range_info **range_list; @@ -235,10 +234,8 @@ errno_t get_my_domain_data(struct pac_ctx *pac_ctx, if (pac_ctx->my_dom_sid == NULL || pac_ctx->range_map == NULL) { if (dom->parent != NULL) { sysdb = dom->parent->sysdb; - dom_name = dom->parent->name; } else { sysdb = dom->sysdb; - dom_name = dom->name; } if (sysdb == NULL) { @@ -254,7 +251,7 @@ errno_t get_my_domain_data(struct pac_ctx *pac_ctx, goto done; } - basedn = sysdb_domain_dn(sysdb, tmp_ctx, dom_name); + basedn = sysdb_domain_dn(sysdb, tmp_ctx); if (basedn == NULL) { ret = ENOMEM; goto done; -- cgit