summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 01:09:05 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit52c72ae8587d8d47393a891ccd4ef06bd4bef856 (patch)
treea396907f3550ca171c216540db61f1f9b6cdc8d1 /src/tools
parent3613cc1eba1337256a2d06ba7a84532156139ccd (diff)
downloadsssd-52c72ae8587d8d47393a891ccd4ef06bd4bef856.tar.gz
sssd-52c72ae8587d8d47393a891ccd4ef06bd4bef856.tar.bz2
sssd-52c72ae8587d8d47393a891ccd4ef06bd4bef856.zip
Make sysdb_group_dn() require a domain explictly.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sss_groupshow.c2
-rw-r--r--src/tools/sss_sync_ops.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c
index 7ba1db13..42076fe8 100644
--- a/src/tools/sss_groupshow.c
+++ b/src/tools/sss_groupshow.c
@@ -423,7 +423,7 @@ static int group_show_trim_memberof(TALLOC_CTX *mem_ctx,
int ret;
int i;
- dn = sysdb_group_dn(sysdb, mem_ctx, name);
+ dn = sysdb_group_dn(sysdb, mem_ctx, domain, name);
if (!dn) {
return ENOMEM;
}
diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 0e3d326a..37fd8c61 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -53,6 +53,7 @@ struct sync_op_res {
* Generic modify groups member
*/
static int mod_groups_member(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *dom,
char **grouplist,
struct ldb_dn *member_dn,
int optype)
@@ -70,8 +71,7 @@ static int mod_groups_member(struct sysdb_ctx *sysdb,
/* FIXME: add transaction around loop */
for (i = 0; grouplist[i]; i++) {
- parent_dn = sysdb_group_dn(sysdb, tmpctx,
- grouplist[i]);
+ parent_dn = sysdb_group_dn(sysdb, tmpctx, dom, grouplist[i]);
if (!parent_dn) {
ret = ENOMEM;
goto done;
@@ -91,10 +91,10 @@ done:
}
#define add_to_groups(sysdb, data, member_dn) \
- mod_groups_member(sysdb, data->addgroups, member_dn, \
+ mod_groups_member(sysdb, data->domain, data->addgroups, member_dn, \
LDB_FLAG_MOD_ADD)
#define remove_from_groups(sysdb, data, member_dn) \
- mod_groups_member(sysdb, data->rmgroups, member_dn, \
+ mod_groups_member(sysdb, data->domain, data->rmgroups, member_dn, \
LDB_FLAG_MOD_DELETE)
/*
@@ -256,7 +256,7 @@ int groupmod(TALLOC_CTX *mem_ctx,
int ret;
if (data->addgroups || data->rmgroups) {
- member_dn = sysdb_group_dn(sysdb, mem_ctx, data->name);
+ member_dn = sysdb_group_dn(sysdb, mem_ctx, data->domain, data->name);
if (!member_dn) {
return ENOMEM;
}
@@ -547,7 +547,7 @@ int groupdel(TALLOC_CTX *mem_ctx,
struct ldb_dn *group_dn;
int ret;
- group_dn = sysdb_group_dn(sysdb, mem_ctx, data->name);
+ group_dn = sysdb_group_dn(sysdb, mem_ctx, data->domain, data->name);
if (group_dn == NULL) {
DEBUG(1, ("Could not construct a group DN\n"));
return ENOMEM;