summaryrefslogtreecommitdiffstats
path: root/server/tools/sss_groupdel.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-10-02 10:39:02 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-10-14 15:24:53 -0400
commit62aa4da7dc3a7826c5a942349e1af9631ca819f5 (patch)
tree7e6419821ae04117ee300022dadcebfa5b94c23b /server/tools/sss_groupdel.c
parent00d9648150da524df2690392995804e69604bdc8 (diff)
downloadsssd-62aa4da7dc3a7826c5a942349e1af9631ca819f5.tar.gz
sssd-62aa4da7dc3a7826c5a942349e1af9631ca819f5.tar.xz
sssd-62aa4da7dc3a7826c5a942349e1af9631ca819f5.zip
Fix error messages in tools
Add getpwnam, getgrnam sync versions Fix ticket #164: Groupnames in non-local domains Fix ticket #100: Error Message Modifying a user that doesn't Exist Fix ticket #214: incorrect error message when MPG already exists Fix ticket #188: Deleting and modifying users in non-local domain Fix ticket #120: Adding a user to a full domain gives unhelpful error message
Diffstat (limited to 'server/tools/sss_groupdel.c')
-rw-r--r--server/tools/sss_groupdel.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/server/tools/sss_groupdel.c b/server/tools/sss_groupdel.c
index a4451c43d..d6e3dfd6a 100644
--- a/server/tools/sss_groupdel.c
+++ b/server/tools/sss_groupdel.c
@@ -23,8 +23,6 @@
#include <stdlib.h>
#include <talloc.h>
#include <popt.h>
-#include <grp.h>
-#include <unistd.h>
#include "db/sysdb.h"
#include "util/util.h"
@@ -35,7 +33,6 @@ int main(int argc, const char **argv)
{
int ret = EXIT_SUCCESS;
int pc_debug = 0;
- struct group *grp_info;
const char *pc_groupname = NULL;
struct tools_ctx *tctx = NULL;
@@ -93,19 +90,6 @@ int main(int argc, const char **argv)
goto fini;
}
- /* arguments processed, go on to actual work */
- grp_info = getgrnam(tctx->octx->name);
- if (grp_info) {
- tctx->octx->gid = grp_info->gr_gid;
- }
-
- /* arguments processed, go on to actual work */
- if (id_in_range(tctx->octx->uid, tctx->octx->domain) != EOK) {
- ERROR("The selected GID is outside the allowed range\n");
- ret = EXIT_FAILURE;
- goto fini;
- }
-
start_transaction(tctx);
if (tctx->error != EOK) {
goto done;
@@ -129,7 +113,8 @@ done:
DEBUG(1, ("sysdb operation failed (%d)[%s]\n", ret, strerror(ret)));
switch (ret) {
case ENOENT:
- ERROR("No such group\n");
+ ERROR("No such group in local domain. "
+ "Removing groups only allowed in local domain.\n");
break;
default: