summaryrefslogtreecommitdiffstats
path: root/server/tools/sss_groupmod.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-07-28 14:02:01 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-07-31 12:08:38 -0400
commit679e67f319974dfdd23371798ef94d441ce195cd (patch)
treecb446d58af7ab26eaac01d7a42a3c28d304a0a24 /server/tools/sss_groupmod.c
parente7c9154dc3346f4a9dd61857ac0d9124fcef6a85 (diff)
downloadsssd-679e67f319974dfdd23371798ef94d441ce195cd.tar.gz
sssd-679e67f319974dfdd23371798ef94d441ce195cd.tar.xz
sssd-679e67f319974dfdd23371798ef94d441ce195cd.zip
Improve error messages
Fixes: * RHBZ 513282 - Error Message Incorrect when Trying to add Group with GID already in use * RHBZ 513284 - Error Message Incorrect when Trying to add User with UID already in use * RHBZ 513242 - Better error Message when modifying a user that doesn't exist * RHBZ 513244 - Better error Message when adding a user to a group that doesn't exist
Diffstat (limited to 'server/tools/sss_groupmod.c')
-rw-r--r--server/tools/sss_groupmod.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/tools/sss_groupmod.c b/server/tools/sss_groupmod.c
index 2fc6f9de5..d91e3771b 100644
--- a/server/tools/sss_groupmod.c
+++ b/server/tools/sss_groupmod.c
@@ -448,7 +448,20 @@ int main(int argc, const char **argv)
if (data->error) {
ret = data->error;
DEBUG(1, ("sysdb operation failed (%d)[%s]\n", ret, strerror(ret)));
- ERROR("Transaction error. Could not modify group.\n");
+ switch (ret) {
+ case ENOENT:
+ ERROR("Could not modify group - check if member group names are correct\n");
+ break;
+
+ case EFAULT:
+ ERROR("Could not modify group - check if groupname is correct\n");
+ break;
+
+ default:
+ ERROR("Transaction error. Could not modify group.\n");
+ break;
+ }
+
ret = EXIT_FAILURE;
goto fini;
}