From d0682cba5cd82d7e0eaffe0a3a8e67fb2b782448 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 12 Aug 2009 06:15:01 -0400 Subject: Fix reversal of parent and member in groupmod ticket #101 --- server/tools/sss_groupmod.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'server') diff --git a/server/tools/sss_groupmod.c b/server/tools/sss_groupmod.c index 5420fc03..175d08d1 100644 --- a/server/tools/sss_groupmod.c +++ b/server/tools/sss_groupmod.c @@ -156,16 +156,16 @@ static void remove_from_groups(struct ops_ctx *data) struct ldb_dn *member_dn; struct tevent_req *req; - member_dn = sysdb_group_dn(data->ctx->sysdb, data, + parent_dn = sysdb_group_dn(data->ctx->sysdb, data, data->domain->name, data->name); - if (!member_dn) { + if (!parent_dn) { return mod_group_done(data, ENOMEM); } - parent_dn = sysdb_group_dn(data->ctx->sysdb, data, + member_dn = sysdb_group_dn(data->ctx->sysdb, data, data->domain->name, data->rmgroups[data->cur]); - if (!parent_dn) { + if (!member_dn) { return mod_group_done(data, ENOMEM); } @@ -213,16 +213,16 @@ static void add_to_groups(struct ops_ctx *data) struct ldb_dn *member_dn; struct tevent_req *req; - member_dn = sysdb_group_dn(data->ctx->sysdb, data, + parent_dn = sysdb_group_dn(data->ctx->sysdb, data, data->domain->name, data->name); - if (!member_dn) { + if (!parent_dn) { return mod_group_done(data, ENOMEM); } - parent_dn = sysdb_group_dn(data->ctx->sysdb, data, + member_dn = sysdb_group_dn(data->ctx->sysdb, data, data->domain->name, data->addgroups[data->cur]); - if (!parent_dn) { + if (!member_dn) { return mod_group_done(data, ENOMEM); } -- cgit