summaryrefslogtreecommitdiffstats
path: root/src/responder/pac
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2013-10-17 14:17:56 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-11-15 20:20:19 +0100
commitd115f40c7a3999e3cbe705a2ff9cf0fd493f80fb (patch)
treec0809b3f8bb0a42186c8d07a65e66800b837c313 /src/responder/pac
parent6a31a971a376a992afb838fe60b311360c970267 (diff)
downloadsssd-d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb.tar.gz
sssd-d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb.tar.xz
sssd-d115f40c7a3999e3cbe705a2ff9cf0fd493f80fb.zip
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 2)
Diffstat (limited to 'src/responder/pac')
-rw-r--r--src/responder/pac/pacsrv_cmd.c14
-rw-r--r--src/responder/pac/pacsrv_utils.c14
2 files changed, 13 insertions, 15 deletions
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c
index fbfaaafca..40ce46bbd 100644
--- a/src/responder/pac/pacsrv_cmd.c
+++ b/src/responder/pac/pacsrv_cmd.c
@@ -287,8 +287,8 @@ static void pac_lookup_sids_done(struct tevent_req *req)
}
msg = NULL;
- ret = sysdb_search_object_by_sid(pr_ctx, dom->sysdb, dom,
- entries[c].key.str, NULL, &msg);
+ ret = sysdb_search_object_by_sid(pr_ctx, dom, entries[c].key.str,
+ NULL, &msg);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_object_by_sid " \
"failed.\n"));
@@ -589,7 +589,7 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
goto done;
}
- ret = sysdb_store_user(sysdb, pr_ctx->dom, pwd->pw_name, NULL,
+ ret = sysdb_store_user(pr_ctx->dom, pwd->pw_name, NULL,
pwd->pw_uid, pwd->pw_gid, pwd->pw_gecos,
pwd->pw_dir,
pwd->pw_shell, NULL, user_attrs, NULL,
@@ -714,7 +714,7 @@ pac_save_memberships_delete(struct pac_save_memberships_state *state)
for (c = 0; c < pr_ctx->del_grp_count; c++) {
/* If there is a failure for one group we still try to remove the
* remaining groups. */
- ret = sysdb_mod_group_member(pr_ctx->dom->sysdb, state->user_dn,
+ ret = sysdb_mod_group_member(pr_ctx->dom, state->user_dn,
pr_ctx->del_grp_list[c].dn,
LDB_FLAG_MOD_DELETE);
if (ret != EOK) {
@@ -901,8 +901,8 @@ pac_store_membership(struct pac_req_ctx *pr_ctx,
return ENOMEM;
}
- ret = sysdb_search_object_by_sid(tmp_ctx, grp_dom->sysdb, grp_dom,
- grp_sid_str, group_attrs, &group);
+ ret = sysdb_search_object_by_sid(tmp_ctx, grp_dom, grp_sid_str,
+ group_attrs, &group);
if (ret != EOK) {
DEBUG(SSSDBG_TRACE_INTERNAL, ("sysdb_search_object_by_sid " \
"for SID [%s] failed [%d][%s].\n",
@@ -927,7 +927,7 @@ pac_store_membership(struct pac_req_ctx *pr_ctx,
DEBUG(SSSDBG_TRACE_ALL, ("Adding user [%s] to group [%s][%s].\n",
ldb_dn_get_linearized(user_dn), grp_sid_str,
ldb_dn_get_linearized(group->msgs[0]->dn)));
- ret = sysdb_mod_group_member(grp_dom->sysdb, user_dn, group->msgs[0]->dn,
+ ret = sysdb_mod_group_member(grp_dom, user_dn, group->msgs[0]->dn,
LDB_FLAG_MOD_ADD);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_mod_group_member failed user [%s] " \
diff --git a/src/responder/pac/pacsrv_utils.c b/src/responder/pac/pacsrv_utils.c
index 30055a134..3e5204720 100644
--- a/src/responder/pac/pacsrv_utils.c
+++ b/src/responder/pac/pacsrv_utils.c
@@ -149,8 +149,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
key.str = sid_str;
value.ul = 0;
- ret = sysdb_search_object_by_sid(mem_ctx, user_dom->sysdb, user_dom,
- sid_str, NULL, &msg);
+ ret = sysdb_search_object_by_sid(mem_ctx, user_dom, sid_str, NULL, &msg);
if (ret == EOK && msg->count == 1) {
value.ul = ldb_msg_find_attr_as_uint64(msg->msgs[0], SYSDB_UIDNUM, 0);
talloc_free(msg);
@@ -184,8 +183,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
key.str = sid_str;
value.ul = 0;
- ret = sysdb_search_object_by_sid(mem_ctx, user_dom->sysdb, user_dom,
- sid_str, NULL, &msg);
+ ret = sysdb_search_object_by_sid(mem_ctx, user_dom, sid_str, NULL, &msg);
if (ret == EOK && msg->count == 1) {
value.ul = ldb_msg_find_attr_as_uint64(msg->msgs[0], SYSDB_GIDNUM, 0);
talloc_free(msg);
@@ -213,8 +211,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
key.str = sid_str;
value.ul = 0;
- ret = sysdb_search_object_by_sid(mem_ctx, user_dom->sysdb, user_dom,
- sid_str, NULL, &msg);
+ ret = sysdb_search_object_by_sid(mem_ctx, user_dom, sid_str,
+ NULL, &msg);
if (ret == EOK && msg->count == 1) {
value.ul = ldb_msg_find_attr_as_uint64(msg->msgs[0],
SYSDB_GIDNUM, 0);
@@ -247,8 +245,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = responder_get_domain_by_id(pac_ctx->rctx, sid_str, &group_dom);
if (ret == EOK) {
- ret = sysdb_search_object_by_sid(mem_ctx, group_dom->sysdb,
- group_dom, sid_str, NULL, &msg);
+ ret = sysdb_search_object_by_sid(mem_ctx, group_dom, sid_str,
+ NULL, &msg);
if (ret == EOK && msg->count == 1 ) {
value.ul = ldb_msg_find_attr_as_uint64(msg->msgs[0],
SYSDB_GIDNUM, 0);