From 60d87f2d861f583c6b9d55b580deededcae7dba7 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 9 Nov 2009 13:37:29 +0100 Subject: Fix regression in error message when deleting groups --- server/tools/sss_groupdel.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'server') diff --git a/server/tools/sss_groupdel.c b/server/tools/sss_groupdel.c index d2b4edfe..84ea0be4 100644 --- a/server/tools/sss_groupdel.c +++ b/server/tools/sss_groupdel.c @@ -94,10 +94,8 @@ int main(int argc, const char **argv) tctx->octx->name, tctx->local, &tctx->octx); if (ret != EOK) { - ERROR("Cannot find group in local domain, " - "modifying groups is allowed only in local domain\n"); - ret = EXIT_FAILURE; - goto fini; + /* Error message will be printed in the switch */ + goto done; } if ((tctx->octx->gid < tctx->local->id_min) || @@ -125,9 +123,9 @@ int main(int argc, const char **argv) end_transaction(tctx); + ret = tctx->error; done: - if (tctx->error) { - ret = tctx->error; + if (ret) { DEBUG(1, ("sysdb operation failed (%d)[%s]\n", ret, strerror(ret))); switch (ret) { case ENOENT: -- cgit