summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.c4
-rw-r--r--src/db/sysdb.h2
-rw-r--r--src/db/sysdb_ops.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index b7951d32a..f7ca64019 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -172,7 +172,7 @@ struct ldb_dn *sysdb_user_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
}
struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
- const char *name)
+ struct sss_domain_info *dom, const char *name)
{
errno_t ret;
char *clean_name;
@@ -184,7 +184,7 @@ struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
}
dn = ldb_dn_new_fmt(mem_ctx, sysdb->ldb, SYSDB_TMPL_GROUP,
- clean_name, sysdb->domain->name);
+ clean_name, dom->name);
talloc_free(clean_name);
return dn;
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 5130b06a8..2f77aa1e0 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -325,7 +325,7 @@ errno_t sysdb_get_rdn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
struct ldb_dn *sysdb_user_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
struct sss_domain_info *dom, const char *name);
struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
- const char *name);
+ struct sss_domain_info *dom, const char *name);
struct ldb_dn *sysdb_netgroup_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx,
const char *name);
struct ldb_dn *sysdb_netgroup_base_dn(struct sysdb_ctx *sysdb, TALLOC_CTX *mem_ctx);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 108f3b848..1f8c83158 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -351,7 +351,7 @@ int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- basedn = sysdb_group_dn(sysdb, tmp_ctx, name);
+ basedn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, name);
if (!basedn) {
ret = ENOMEM;
goto done;
@@ -592,7 +592,7 @@ int sysdb_set_group_attr(struct sysdb_ctx *sysdb,
goto done;
}
- dn = sysdb_group_dn(sysdb, tmp_ctx, name);
+ dn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, name);
if (!dn) {
ret = ENOMEM;
goto done;
@@ -1223,7 +1223,7 @@ int sysdb_add_basic_group(struct sysdb_ctx *sysdb,
}
/* group dn */
- msg->dn = sysdb_group_dn(sysdb, msg, name);
+ msg->dn = sysdb_group_dn(sysdb, msg, sysdb->domain, name);
if (!msg->dn) {
ERROR_OUT(ret, ENOMEM, done);
}
@@ -1876,7 +1876,7 @@ sysdb_group_membership_mod(struct sysdb_ctx *sysdb,
if (type == SYSDB_MEMBER_USER) {
member_dn = sysdb_user_dn(sysdb, tmp_ctx, sysdb->domain, member);
} else if (type == SYSDB_MEMBER_GROUP) {
- member_dn = sysdb_group_dn(sysdb, tmp_ctx, member);
+ member_dn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, member);
} else {
ret = EINVAL;
goto done;
@@ -1887,7 +1887,7 @@ sysdb_group_membership_mod(struct sysdb_ctx *sysdb,
goto done;
}
- group_dn = sysdb_group_dn(sysdb, tmp_ctx, group);
+ group_dn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, group);
if (!group_dn) {
ret = ENOMEM;
goto done;
@@ -3049,7 +3049,7 @@ errno_t sysdb_remove_attrs(struct sysdb_ctx *sysdb,
break;
case SYSDB_MEMBER_GROUP:
- msg->dn = sysdb_group_dn(sysdb, msg, name);
+ msg->dn = sysdb_group_dn(sysdb, msg, sysdb->domain, name);
break;
case SYSDB_MEMBER_NETGROUP: