diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-05-18 10:06:19 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-15 09:16:38 -0400 |
commit | 8a1738f9379a1b8fb5c95c3df649e014ff5a1434 (patch) | |
tree | dd5a59e95b88d1edb7b21a5035692571422b454c /src/responder/pam | |
parent | 237ade4114ae88f87c814d447dfd5aebdbdf72ef (diff) | |
download | sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.tar.gz sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.tar.xz sssd-8a1738f9379a1b8fb5c95c3df649e014ff5a1434.zip |
sysdb refactoring: deleted domain variables in sysdb API
The patch also updates code using modified functions. Tests have also
been adjusted.
Diffstat (limited to 'src/responder/pam')
-rw-r--r-- | src/responder/pam/pam_LOCAL_domain.c | 6 | ||||
-rw-r--r-- | src/responder/pam/pamsrv_cmd.c | 10 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c index 6e0631aa8..d636fd33b 100644 --- a/src/responder/pam/pam_LOCAL_domain.c +++ b/src/responder/pam/pam_LOCAL_domain.c @@ -87,7 +87,6 @@ static void do_successful_login(struct LOCAL_request *lreq) lreq->error, ret, done); ret = sysdb_set_user_attr(lreq, lreq->dbctx, - lreq->preq->domain, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), @@ -129,7 +128,6 @@ static void do_failed_login(struct LOCAL_request *lreq) lreq->error, ret, done); ret = sysdb_set_user_attr(lreq, lreq->dbctx, - lreq->preq->domain, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), @@ -203,7 +201,6 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq) lreq->error, ret, done); ret = sysdb_set_user_attr(lreq, lreq->dbctx, - lreq->preq->domain, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), @@ -254,8 +251,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq) pd->pam_status = PAM_SUCCESS; - ret = sysdb_get_user_attr(lreq, lreq->dbctx, - preq->domain, preq->pd->user, + ret = sysdb_get_user_attr(lreq, lreq->dbctx, preq->pd->user, attrs, &res); if (ret != EOK) { DEBUG(1, ("sysdb_get_user_attr failed.\n")); diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c index 3c9d7600a..48228e97f 100644 --- a/src/responder/pam/pamsrv_cmd.c +++ b/src/responder/pam/pamsrv_cmd.c @@ -310,9 +310,8 @@ static errno_t set_last_login(struct pam_auth_req *preq) goto fail; } - ret = sysdb_set_user_attr(preq, dbctx, - preq->domain, preq->pd->user, - attrs, SYSDB_MOD_REP); + ret = sysdb_set_user_attr(preq, dbctx, preq->pd->user, attrs, + SYSDB_MOD_REP); if (ret != EOK) { DEBUG(2, ("set_last_login failed.\n")); preq->pd->pam_status = PAM_SYSTEM_ERR; @@ -485,8 +484,7 @@ static void pam_reply(struct pam_auth_req *preq) goto done; } - ret = sysdb_cache_auth(preq, sysdb, - preq->domain, pd->user, + ret = sysdb_cache_auth(preq, sysdb, pd->user, pd->authtok, pd->authtok_size, pctx->rctx->cdb, false, &exp_date, &delay_until); @@ -849,7 +847,7 @@ static int pam_check_user_search(struct pam_auth_req *preq) preq->pd->pam_status = PAM_SYSTEM_ERR; return EFAULT; } - ret = sysdb_getpwnam(preq, sysdb, dom, name, &preq->res); + ret = sysdb_getpwnam(preq, sysdb, name, &preq->res); if (ret != EOK) { DEBUG(1, ("Failed to make request to our cache!\n")); return EIO; |