summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.c8
-rw-r--r--src/db/sysdb.h4
-rw-r--r--src/providers/ldap/sdap_async_netgroups.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index edfcef02..c79a6334 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -209,10 +209,12 @@ struct ldb_dn *sysdb_netgroup_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
return dn;
}
-struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx)
+struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb,
+ TALLOC_CTX *mem_ctx,
+ struct sss_domain_info *dom)
{
- return ldb_dn_new_fmt(mem_ctx, sysdb->ldb, SYSDB_TMPL_NETGROUP_BASE,
- sysdb->domain->name);
+ return ldb_dn_new_fmt(mem_ctx, sysdb->ldb,
+ SYSDB_TMPL_NETGROUP_BASE, dom->name);
}
errno_t sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index fd00fa35..d558884b 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -328,7 +328,9 @@ struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
struct sss_domain_info *dom, const char *name);
struct ldb_dn *sysdb_netgroup_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
struct sss_domain_info *dom, const char *name);
-struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx);
+struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb,
+ TALLOC_CTX *mem_ctx,
+ struct sss_domain_info *dom);
errno_t sysdb_group_dn_name(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
const char *dn_str, char **name);
struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx);
diff --git a/src/providers/ldap/sdap_async_netgroups.c b/src/providers/ldap/sdap_async_netgroups.c
index 12715d49..57a9b943 100644
--- a/src/providers/ldap/sdap_async_netgroups.c
+++ b/src/providers/ldap/sdap_async_netgroups.c
@@ -324,7 +324,7 @@ struct tevent_req *netgr_translate_members_send(TALLOC_CTX *memctx,
goto fail;
}
- netgr_basedn = sysdb_netgroup_base_dn(sysdb, state);
+ netgr_basedn = sysdb_netgroup_base_dn(sysdb, state, dom);
if (netgr_basedn == NULL) {
ret = ENOMEM;
goto fail;