summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 17:42:57 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commitc3ca06c011a34997cd6ec5d1e5927fee12bf2464 (patch)
treeedafe7f21cb2ad5f544691509bd7f20ffa4d06a1
parent1826891a4869450994ae82adb60215ca564f9f4d (diff)
downloadsssd-c3ca06c011a34997cd6ec5d1e5927fee12bf2464.tar.gz
sssd-c3ca06c011a34997cd6ec5d1e5927fee12bf2464.tar.xz
sssd-c3ca06c011a34997cd6ec5d1e5927fee12bf2464.zip
Add domain argument to sysdb_initgroups()
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_search.c3
-rw-r--r--src/providers/data_provider_be.c2
-rw-r--r--src/responder/nss/nsssrv_cmd.c4
-rw-r--r--src/responder/pac/pacsrv_cmd.c3
5 files changed, 8 insertions, 5 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 151cd7f98..fcb5ba5b2 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -507,6 +507,7 @@ errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
int sysdb_initgroups(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
struct ldb_result **res);
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 34379d489..aab53bbca 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -384,6 +384,7 @@ done:
int sysdb_initgroups(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
struct ldb_result **_res)
{
@@ -401,7 +402,7 @@ int sysdb_initgroups(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- ret = sysdb_getpwnam(tmp_ctx, sysdb, sysdb->domain, name, &res);
+ ret = sysdb_getpwnam(tmp_ctx, sysdb, domain, name, &res);
if (ret != EOK) {
DEBUG(1, ("sysdb_getpwnam failed: [%d][%s]\n",
ret, strerror(ret)));
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 5b6bbc4a3..452979c0d 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -665,7 +665,7 @@ static errno_t be_initgroups_prereq(struct be_req *be_req)
int i;
ret = sysdb_initgroups(be_req, be_req->be_ctx->sysdb,
- ar->filter_value, &res);
+ be_req->be_ctx->domain, ar->filter_value, &res);
if (ret && ret != ENOENT) {
return ret;
}
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index d40b3f989..63d82e22c 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -3435,7 +3435,7 @@ void nss_update_initgr_memcache(struct nss_ctx *nctx,
tmp_ctx = talloc_new(NULL);
- ret = sysdb_initgroups(tmp_ctx, dom->sysdb, name, &res);
+ ret = sysdb_initgroups(tmp_ctx, dom->sysdb, dom, name, &res);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Failed to make request to our cache! [%d][%s]\n",
@@ -3635,7 +3635,7 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
return EIO;
}
- ret = sysdb_initgroups(cmdctx, sysdb, name, &dctx->res);
+ ret = sysdb_initgroups(cmdctx, sysdb, dom, name, &dctx->res);
if (ret != EOK) {
DEBUG(1, ("Failed to make request to our cache! [%d][%s]\n",
ret, strerror(ret)));
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c
index dc5c4231a..4d5755d5f 100644
--- a/src/responder/pac/pacsrv_cmd.c
+++ b/src/responder/pac/pacsrv_cmd.c
@@ -292,7 +292,8 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sysdb_initgroups(tmp_ctx, sysdb, pr_ctx->user_name, &res);
+ ret = sysdb_initgroups(tmp_ctx, sysdb,
+ pr_ctx->dom, pr_ctx->user_name, &res);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_initgroups failed.\n"));
goto done;