summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 151cd7f9..fcb5ba5b 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 34379d48..aab53bbc 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 5b6bbc4a..452979c0 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 d40b3f98..63d82e22 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 dc5c4231..4d5755d5 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;