summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2013-10-11 19:58:27 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-11-15 20:20:18 +0100
commit4c08db0fb0dda3d27b1184248ca5c800d7ce23f0 (patch)
tree2e7654f526442657e3f7dbf832cc067d1be2dc80 /src/responder
parent19d8bc19b5b5597427878645644fa354ef6cb54d (diff)
downloadsssd-4c08db0fb0dda3d27b1184248ca5c800d7ce23f0.tar.gz
sssd-4c08db0fb0dda3d27b1184248ca5c800d7ce23f0.tar.xz
sssd-4c08db0fb0dda3d27b1184248ca5c800d7ce23f0.zip
SYSDB: Drop the sysdb_ctx parameter - module sysdb_ops (part 1)
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/nss/nsssrv_cmd.c12
-rw-r--r--src/responder/pac/pacsrv_cmd.c7
-rw-r--r--src/responder/pam/pam_LOCAL_domain.c6
-rw-r--r--src/responder/pam/pamsrv_cmd.c4
4 files changed, 14 insertions, 15 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index ddbdbc709..00a67aa9f 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -3816,8 +3816,8 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
}
if (cmdctx->cmd == SSS_NSS_GETSIDBYID) {
- ret = sysdb_search_user_by_uid(cmdctx, sysdb, dom, cmdctx->id,
- attrs, &msg);
+ ret = sysdb_search_user_by_uid(cmdctx, dom, cmdctx->id, attrs,
+ &msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Failed to make request to our cache!\n"));
@@ -3829,8 +3829,8 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
user_found = true;
} else {
talloc_free(msg);
- ret = sysdb_search_group_by_gid(cmdctx, sysdb, dom, cmdctx->id,
- attrs, &msg);
+ ret = sysdb_search_group_by_gid(cmdctx, dom, cmdctx->id, attrs,
+ &msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Failed to make request to our cache!\n"));
@@ -3843,7 +3843,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
}
}
} else {
- ret = sysdb_search_user_by_name(cmdctx, sysdb, dom,
+ ret = sysdb_search_user_by_name(cmdctx, dom,
sysdb_name ? sysdb_name : name,
attrs, &msg);
if (ret != EOK && ret != ENOENT) {
@@ -3857,7 +3857,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
user_found = true;
} else {
talloc_free(msg);
- ret = sysdb_search_group_by_name(cmdctx, sysdb, dom,
+ ret = sysdb_search_group_by_name(cmdctx, dom,
sysdb_name ? sysdb_name : name,
attrs, &msg);
if (ret != EOK && ret != ENOENT) {
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c
index cf5beaf26..fbfaaafca 100644
--- a/src/responder/pac/pacsrv_cmd.c
+++ b/src/responder/pac/pacsrv_cmd.c
@@ -572,8 +572,8 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
goto done;
}
- ret = sysdb_search_user_by_uid(tmp_ctx, sysdb, pr_ctx->dom,
- pwd->pw_uid, attrs, &msg);
+ ret = sysdb_search_user_by_uid(tmp_ctx, pr_ctx->dom, pwd->pw_uid, attrs,
+ &msg);
if (ret == ENOENT) {
if (pwd->pw_gid == 0 && !pr_ctx->dom->mpg) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Primary group RID from the PAC " \
@@ -644,8 +644,7 @@ struct tevent_req *pac_save_memberships_send(struct pac_req_ctx *pr_ctx)
goto done;
}
- ret = sysdb_search_user_by_name(state, dom->sysdb, dom, dom_name, NULL,
- &msg);
+ ret = sysdb_search_user_by_name(state, dom, dom_name, NULL, &msg);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_user_by_name failed " \
"[%d][%s].\n", ret, strerror(ret)));
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c
index 4c2de626d..bb7378581 100644
--- a/src/responder/pam/pam_LOCAL_domain.c
+++ b/src/responder/pam/pam_LOCAL_domain.c
@@ -87,7 +87,7 @@ static void do_successful_login(struct LOCAL_request *lreq)
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
lreq->error, ret, done);
- ret = sysdb_set_user_attr(lreq->dbctx, lreq->domain,
+ ret = sysdb_set_user_attr(lreq->domain,
lreq->preq->pd->user,
lreq->mod_attrs, SYSDB_MOD_REP);
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
@@ -128,7 +128,7 @@ static void do_failed_login(struct LOCAL_request *lreq)
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
lreq->error, ret, done);
- ret = sysdb_set_user_attr(lreq->dbctx, lreq->domain,
+ ret = sysdb_set_user_attr(lreq->domain,
lreq->preq->pd->user,
lreq->mod_attrs, SYSDB_MOD_REP);
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
@@ -197,7 +197,7 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq)
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_attrs_add_long failed.\n"),
lreq->error, ret, done);
- ret = sysdb_set_user_attr(lreq->dbctx, lreq->domain,
+ ret = sysdb_set_user_attr(lreq->domain,
lreq->preq->pd->user,
lreq->mod_attrs, SYSDB_MOD_REP);
NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"),
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 006c3e227..f8d7a091a 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -351,8 +351,8 @@ static errno_t set_last_login(struct pam_auth_req *preq)
goto fail;
}
- ret = sysdb_set_user_attr(preq->domain->sysdb, preq->domain,
- preq->pd->user, attrs, SYSDB_MOD_REP);
+ ret = sysdb_set_user_attr(preq->domain, preq->pd->user, attrs,
+ SYSDB_MOD_REP);
if (ret != EOK) {
DEBUG(2, ("set_last_login failed.\n"));
preq->pd->pam_status = PAM_SYSTEM_ERR;