From df0596ec12bc5091608371e2977f3111241e8caf Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 9 Jan 2013 16:23:25 -0500 Subject: Remove sysdb as a be context structure member The sysdb context is already available through the 'domain' structure. --- src/providers/simple/simple_access.c | 7 +++---- src/providers/simple/simple_access.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/providers/simple') diff --git a/src/providers/simple/simple_access.c b/src/providers/simple/simple_access.c index f7f9192e3..a6683a697 100644 --- a/src/providers/simple/simple_access.c +++ b/src/providers/simple/simple_access.c @@ -107,7 +107,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username, goto done; } - ret = sysdb_search_user_by_name(tmp_ctx, ctx->sysdb, ctx->domain, + ret = sysdb_search_user_by_name(tmp_ctx, ctx->domain->sysdb, ctx->domain, username, user_attrs, &msg); if (ret != EOK) { DEBUG(1, ("Could not look up username [%s]: [%d][%s]\n", @@ -130,7 +130,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username, for (j = 0; j < el->num_values; j++) { ret = sysdb_group_dn_name( - ctx->sysdb, tmp_ctx, + ctx->domain->sysdb, tmp_ctx, (char *)el->values[j].data, &groups[j]); if (ret != EOK) { @@ -155,7 +155,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username, } talloc_zfree(msg); - ret = sysdb_search_group_by_gid(tmp_ctx, ctx->sysdb, ctx->domain, + ret = sysdb_search_group_by_gid(tmp_ctx, ctx->domain->sysdb, ctx->domain, gid, group_attrs, &msg); if (ret != EOK) { DEBUG(1, ("Could not look up primary group [%lu]: [%d][%s]\n", @@ -288,7 +288,6 @@ int sssm_simple_access_init(struct be_ctx *bectx, struct bet_ops **ops, return ENOMEM; } - ctx->sysdb = bectx->sysdb; ctx->domain = bectx->domain; /* Users */ diff --git a/src/providers/simple/simple_access.h b/src/providers/simple/simple_access.h index abcf61ac2..c28541464 100644 --- a/src/providers/simple/simple_access.h +++ b/src/providers/simple/simple_access.h @@ -27,7 +27,6 @@ #include "util/util.h" struct simple_ctx { - struct sysdb_ctx *sysdb; struct sss_domain_info *domain; char **allow_users; -- cgit