diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-05-20 03:48:05 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-15 09:16:39 -0400 |
commit | e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb (patch) | |
tree | 4dc9339ee81eb20437e7091b77c7cc7ea19782c1 /src/responder | |
parent | 8a1738f9379a1b8fb5c95c3df649e014ff5a1434 (diff) | |
download | sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.tar.gz sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.tar.xz sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.zip |
sysdb refactoring: memory context deleted
This patch deletes memory context parameter in those places in sysdb
where it is not necessary. The code using modified functions has been
updated. Tests updated as well.
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/pam/pam_LOCAL_domain.c | 9 | ||||
-rw-r--r-- | src/responder/pam/pamsrv_cmd.c | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c index d636fd33b..66f3a8858 100644 --- a/src/responder/pam/pam_LOCAL_domain.c +++ b/src/responder/pam/pam_LOCAL_domain.c @@ -86,8 +86,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, lreq->dbctx, - lreq->preq->pd->user, + ret = sysdb_set_user_attr(lreq->dbctx, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), lreq->error, ret, done); @@ -127,8 +126,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, lreq->dbctx, - lreq->preq->pd->user, + ret = sysdb_set_user_attr(lreq->dbctx, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), lreq->error, ret, done); @@ -200,8 +198,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, lreq->dbctx, - lreq->preq->pd->user, + ret = sysdb_set_user_attr(lreq->dbctx, lreq->preq->pd->user, lreq->mod_attrs, SYSDB_MOD_REP); NEQ_CHECK_OR_JUMP(ret, EOK, ("sysdb_set_user_attr failed.\n"), lreq->error, ret, done); diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c index 48228e97f..1d2a2a58e 100644 --- a/src/responder/pam/pamsrv_cmd.c +++ b/src/responder/pam/pamsrv_cmd.c @@ -310,8 +310,7 @@ static errno_t set_last_login(struct pam_auth_req *preq) goto fail; } - ret = sysdb_set_user_attr(preq, dbctx, preq->pd->user, attrs, - SYSDB_MOD_REP); + ret = sysdb_set_user_attr(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; @@ -484,7 +483,7 @@ static void pam_reply(struct pam_auth_req *preq) goto done; } - ret = sysdb_cache_auth(preq, sysdb, pd->user, + ret = sysdb_cache_auth(sysdb, pd->user, pd->authtok, pd->authtok_size, pctx->rctx->cdb, false, &exp_date, &delay_until); |