aboutsummaryrefslogtreecommitdiffstats
path: root/USER
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2003-06-05 17:18:59 +0000
committerDaouda Lo <daouda@mandriva.com>2003-06-05 17:18:59 +0000
commit926ff99773475e273210195ca09897c2e0915362 (patch)
tree085d29f46e0df7ff55ed72154c514f251493702a /USER
parent33b633e9b1412e3d53ba2fb755fb3a68ee5b501c (diff)
downloaduserdrake-926ff99773475e273210195ca09897c2e0915362.tar
userdrake-926ff99773475e273210195ca09897c2e0915362.tar.gz
userdrake-926ff99773475e273210195ca09897c2e0915362.tar.bz2
userdrake-926ff99773475e273210195ca09897c2e0915362.tar.xz
userdrake-926ff99773475e273210195ca09897c2e0915362.zip
- delete group when deleting user
Diffstat (limited to 'USER')
-rw-r--r--USER/USER.xs21
1 files changed, 16 insertions, 5 deletions
diff --git a/USER/USER.xs b/USER/USER.xs
index d1ef6c9..e7d9e60 100644
--- a/USER/USER.xs
+++ b/USER/USER.xs
@@ -250,7 +250,7 @@ lu_homedir_remove(const char *directory, struct lu_error ** error)
return 0;
}
- return TRUE;
+ return 1;
}
/* Move a directory from one place to another. */
int
@@ -528,18 +528,24 @@ Admin_UserAdd(self, ent, is_system, dont_create_home)
}
/* Create a mail spool for the user. */
- if (lu_mailspool_create_remove(self, ent, TRUE) != 1) {
+ if (lu_mailspool_create_remove(self, ent, 1) != 1) {
warn(_("Error creating mail spool.\n"));
- return 8;
+ RETVAL = 3;
}
}
OUTPUT:
RETVAL
-void
+int
Admin_UserDel(self, ent)
USER::ADMIN *self
USER::ENT *ent
+ PPCODE:
+ USER__ERR *error;
+ if (lu_user_delete(self, ent, &error) == FALSE) {
+ croak("User Could Not be deleted: %s.\n", error ? error->string : "Unknown error");
+ RETVAL = 0;
+ } else RETVAL = 1 ;
void
Admin_UserEdit(self, ent)
@@ -641,7 +647,12 @@ void
Admin_GroupDel(self, ent)
USER::ADMIN *self
USER::ENT *ent
-
+ PPCODE:
+ USER__ERR *error;
+ if (lu_group_delete(self, ent, &error) == FALSE) {
+ croak("Group could not be deleted: %s.\n", error ? error->string : "Unknown error");
+ RETVAL = 0;
+ } else RETVAL = 1 ;
void
Admin_GroupEdit(self, ent)
USER::ADMIN *self