diff options
author | Sumit Bose <sbose@redhat.com> | 2012-02-03 13:57:00 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-02-29 12:53:47 -0500 |
commit | b7b50b21d2254a079b1b1c299909483d23db1512 (patch) | |
tree | c2c9b2bff77dfadb9d70d348ad6ffb06c60e8d2b /src/responder/sudo | |
parent | d2d2d6ae0c436461bcc8f881df059eb036314c44 (diff) | |
download | sssd-b7b50b21d2254a079b1b1c299909483d23db1512.tar.gz sssd-b7b50b21d2254a079b1b1c299909483d23db1512.tar.bz2 sssd-b7b50b21d2254a079b1b1c299909483d23db1512.zip |
Remove sysdb_get_ctx_from_list()
Diffstat (limited to 'src/responder/sudo')
-rw-r--r-- | src/responder/sudo/sudosrv_get_sudorules.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c index 2988b519..abdf3e76 100644 --- a/src/responder/sudo/sudosrv_get_sudorules.c +++ b/src/responder/sudo/sudosrv_get_sudorules.c @@ -111,9 +111,8 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx) DEBUG(SSSDBG_FUNC_DATA, ("Requesting info about [%s@%s]\n", name, dom->name)); - ret = sysdb_get_ctx_from_list(cli_ctx->rctx->db_list, - dctx->domain, &sysdb); - if (ret != EOK) { + sysdb = dctx->domain->sysdb; + if (sysdb == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, ("sysdb context not found for this domain!\n")); ret = EIO; @@ -400,7 +399,6 @@ static errno_t sudosrv_get_sudorules_from_cache(struct sudo_dom_ctx *dctx) TALLOC_CTX *tmp_ctx; errno_t ret; struct sysdb_ctx *sysdb; - struct cli_ctx *cli_ctx = dctx->cmd_ctx->cli_ctx; struct sudo_ctx *sudo_ctx = dctx->cmd_ctx->sudo_ctx; uid_t uid; char **groupnames; @@ -410,9 +408,8 @@ static errno_t sudosrv_get_sudorules_from_cache(struct sudo_dom_ctx *dctx) tmp_ctx = talloc_new(NULL); if (tmp_ctx == NULL) return ENOMEM; - ret = sysdb_get_ctx_from_list(cli_ctx->rctx->db_list, - dctx->domain, &sysdb); - if (ret != EOK) { + sysdb = dctx->domain->sysdb; + if (sysdb == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, ("sysdb context not found for this domain!\n")); ret = EIO; |