From 5e22a141d0d755c1ee54ea40c5795e56ba18d02f Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 30 Jul 2009 18:03:47 +0200 Subject: Use correct return codes Some code paths that should exit with an error used potentionally incorrect return code. --- server/tools/sss_groupdel.c | 2 +- server/tools/sss_groupmod.c | 2 +- server/tools/sss_userdel.c | 2 +- server/tools/sss_usermod.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/tools/sss_groupdel.c b/server/tools/sss_groupdel.c index 98d73c39..29778263 100644 --- a/server/tools/sss_groupdel.c +++ b/server/tools/sss_groupdel.c @@ -99,7 +99,7 @@ static void group_del(struct tevent_req *req) subreq = sysdb_delete_entry_send(data, data->ev, data->handle, group_dn); if (!subreq) - return groupdel_done(data, ret, NULL); + return groupdel_done(data, ENOMEM, NULL); tevent_req_set_callback(subreq, group_del_done, data); } diff --git a/server/tools/sss_groupmod.c b/server/tools/sss_groupmod.c index d91e3771..d6088846 100644 --- a/server/tools/sss_groupmod.c +++ b/server/tools/sss_groupmod.c @@ -114,7 +114,7 @@ static void mod_group(struct tevent_req *req) data->domain, data->name, attrs, SYSDB_MOD_REP); if (!subreq) { - return mod_group_done(data, ret); + return mod_group_done(data, ENOMEM); } tevent_req_set_callback(subreq, mod_group_attr_done, data); return; diff --git a/server/tools/sss_userdel.c b/server/tools/sss_userdel.c index f70482ce..c4d9abd3 100644 --- a/server/tools/sss_userdel.c +++ b/server/tools/sss_userdel.c @@ -100,7 +100,7 @@ static void user_del(struct tevent_req *req) subreq = sysdb_delete_entry_send(data, data->ev, data->handle, user_dn); if (!subreq) - return userdel_done(data, ret, NULL); + return userdel_done(data, ENOMEM, NULL); tevent_req_set_callback(subreq, user_del_done, data); } diff --git a/server/tools/sss_usermod.c b/server/tools/sss_usermod.c index 65e94978..cc94be3a 100644 --- a/server/tools/sss_usermod.c +++ b/server/tools/sss_usermod.c @@ -140,7 +140,7 @@ static void mod_user(struct tevent_req *req) data->domain, data->name, data->attrs, SYSDB_MOD_REP); if (!subreq) { - return mod_user_done(data, ret); + return mod_user_done(data, ENOMEM); } tevent_req_set_callback(subreq, mod_user_attr_done, data); return; -- cgit