summaryrefslogtreecommitdiff
path: root/src/providers/simple
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 16:23:25 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:33 +0100
commitdf0596ec12bc5091608371e2977f3111241e8caf (patch)
treee659ecee1bb913e4648a4313ffab1d0c1794da19 /src/providers/simple
parent7a468783159880f81f7cd9270ee94bf0954d6a56 (diff)
downloadsssd-df0596ec12bc5091608371e2977f3111241e8caf.tar.gz
sssd-df0596ec12bc5091608371e2977f3111241e8caf.tar.bz2
sssd-df0596ec12bc5091608371e2977f3111241e8caf.zip
Remove sysdb as a be context structure member
The sysdb context is already available through the 'domain' structure.
Diffstat (limited to 'src/providers/simple')
-rw-r--r--src/providers/simple/simple_access.c7
-rw-r--r--src/providers/simple/simple_access.h1
2 files changed, 3 insertions, 5 deletions
diff --git a/src/providers/simple/simple_access.c b/src/providers/simple/simple_access.c
index f7f9192e..a6683a69 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 abcf61ac..c2854146 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;