aboutsummaryrefslogtreecommitdiffstats
path: root/USER
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2003-06-23 10:41:04 +0000
committerDaouda Lo <daouda@mandriva.com>2003-06-23 10:41:04 +0000
commit6de08d95dd4875798855978f5440d4a823ed38cc (patch)
treea6421343e35c0d788fe00603359e0482865eb4f1 /USER
parenteffbb6e71e8fdcc63875ea8e66625960b6b599c0 (diff)
downloaduserdrake-6de08d95dd4875798855978f5440d4a823ed38cc.tar
userdrake-6de08d95dd4875798855978f5440d4a823ed38cc.tar.gz
userdrake-6de08d95dd4875798855978f5440d4a823ed38cc.tar.bz2
userdrake-6de08d95dd4875798855978f5440d4a823ed38cc.tar.xz
userdrake-6de08d95dd4875798855978f5440d4a823ed38cc.zip
- final release
- enable search
Diffstat (limited to 'USER')
-rw-r--r--USER/USER.xs34
1 files changed, 8 insertions, 26 deletions
diff --git a/USER/USER.xs b/USER/USER.xs
index 84ff583..ffd22e1 100644
--- a/USER/USER.xs
+++ b/USER/USER.xs
@@ -613,7 +613,7 @@ Admin_UserSetPass(self, ent, userPasswd)
char *userPasswd
PPCODE:
USER__ERR *error = NULL;
- gboolean crypted = TRUE;
+ gboolean crypted = FALSE;
if (lu_user_setpass(self, ent, userPasswd, crypted, &error) == FALSE) {
croak("Failed to set password %s.\n", error ? error->string : _("unknown error"));
if (error) { lu_error_free(&error); }
@@ -935,7 +935,7 @@ Ent_UserName(self, ssv)
lu_ent_clear(self, LU_USERNAME);
lu_ent_add(self, LU_USERNAME, &val);
} else {
- warn("XS_UserAdd: Cannot make operation on LU_USERNAME attribute");
+ warn("XS_UserName: Cannot make operation on LU_USERNAME attribute");
}
void
@@ -974,7 +974,7 @@ Ent_MemberName(self, rv, AddOrDel)
GValueArray *members;
GValue *value, val;
RETVAL = (AV*)sv_2mortal((SV*)newAV());
- char **member = NULL;
+ char *member = NULL;
int c;
if ( SvIOK(rv) && SvIV(rv) == 1) {
members = lu_ent_get(self, LU_MEMBERNAME);
@@ -986,32 +986,14 @@ Ent_MemberName(self, rv, AddOrDel)
} else if ( SvPOK( rv ) ) {
memset(&val, 0, sizeof(val));
g_value_init(&val, G_TYPE_STRING);
+ member = SvPV(rv, PL_na);
+ g_value_set_string(&val, member);
if (AddOrDel == 1) {
- member = g_strsplit(SvPV(rv, PL_na), ",", 0);
- if (member) {
- for (c = 0; member && member[c]; c++) {
- g_value_set_string(&val, member[c]);
- lu_ent_add(self, LU_MEMBERNAME, &val);
- g_value_reset(&val);
- }
- lu_hup_nscd();
- g_strfreev(member);
- member = NULL;
- }
+ lu_ent_add(self, LU_MEMBERNAME, &val);
} else if (AddOrDel == 2) {
- member = g_strsplit(SvPV(rv, PL_na), ",", 0);
- if (member) {
- for (c = 0; member && member[c]; c++) {
- g_value_set_string(&val, member[c]);
- lu_ent_del(self, LU_MEMBERNAME, &val);
- g_value_reset(&val);
- }
- lu_hup_nscd();
- g_strfreev(member);
- member = NULL;
- }
- g_value_unset(&val);
+ lu_ent_del(self, LU_MEMBERNAME, &val);
}
+ g_value_reset(&val);
} else {
croak("XS_MemberName: Cannot make operation on LU_MEMBERNAME attribute");
};