diff options
author | Daouda Lo <daouda@mandriva.com> | 2003-04-04 15:32:08 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2003-04-04 15:32:08 +0000 |
commit | 74f5bbe1365808d62b476dbb14c466422ae3776f (patch) | |
tree | 6808a63a5fcd13c2b9e174447e3014601944115c | |
parent | 65ee6f512d7c75a1c4c1c4d225a6640af3ff8845 (diff) | |
download | userdrake-74f5bbe1365808d62b476dbb14c466422ae3776f.tar userdrake-74f5bbe1365808d62b476dbb14c466422ae3776f.tar.gz userdrake-74f5bbe1365808d62b476dbb14c466422ae3776f.tar.bz2 userdrake-74f5bbe1365808d62b476dbb14c466422ae3776f.tar.xz userdrake-74f5bbe1365808d62b476dbb14c466422ae3776f.zip |
- update broken code
-rw-r--r-- | USER/USER.xs | 96 |
1 files changed, 56 insertions, 40 deletions
diff --git a/USER/USER.xs b/USER/USER.xs index df8e796..6cb362b 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -42,53 +42,48 @@ convert_value_array_list(register SV **sp, GValueArray *array) { return sp; } -static char * -get_string(USER__ENT *ent, ) { - char -} - MODULE = USER PACKAGE = USER::ADMIN PREFIX = Admin_ USER::ADMIN Admin_new(CLASS) char *CLASS - CODE: + CODE: RETVAL = (USER__ADMIN)safemalloc( sizeof( USER__ADMIN ) ); if( RETVAL == NULL ){ warn("unable to malloc USER__ADMIN"); XSRETURN_UNDEF; } - OUTPUT: + OUTPUT: RETVAL - + void Admin_start(self) - USER::ADMIN self - CODE: - USER__ERR error; - self = lu_start(NULL, 0, NULL, NULL, NULL, NULL, &error); - + USER::ADMIN self + CODE: + USER__ERR error; + self = lu_start(NULL, 0, NULL, NULL, NULL, NULL, &error); + void Admin_DESTROY(self) - USER::ADMIN self - CODE: - lu_end(self); - lu_ctx_free(self) - + USER::ADMIN self + CODE: + lu_end(self); + lu_ctx_free(self) + void Admin_lookup_user_name(self, name) - USER::ADMIN self - char *name - PREINIT: - USER::ENT ent; - USER__ERR err; - PPCODE: - ent = lu_ent_new(); - if ( lu_user_lookup_name(self, name, ent, &err)) { - XPUSHs(sv_2mortal(newSViv(ent))) - } else { - /* No such user. Clean up and bug out. */ - lu_ent_free(ent); + USER::ADMIN self + char *name + PREINIT: + USER::ENT ent; + USER__ERR err; + PPCODE: + ent = lu_ent_new(); + if ( lu_user_lookup_name(self, name, ent, &err)) { + XPUSHs(sv_2mortal(newSViv(ent))) + } else { + /* No such user. Clean up and bug out. */ + lu_ent_free(ent); } MODULE = USER PACKAGE = USER::ENT Prefix = PREFIX_ @@ -96,27 +91,48 @@ MODULE = USER PACKAGE = USER::ENT Prefix = PREFIX_ USER::ENT Ent_new (CLASS) char *CLASS - CODE: + CODE: RETVAL = (USER__ENT)safemalloc( sizeof( USER__ENT ) ); if( RETVAL == NULL ){ - warn("unable to malloc USER__CTX"); + warn("unable to malloc USER__ENT"); XSRETURN_UNDEF; } - OUTPUT: + OUTPUT: RETVAL +void +Ent_begin(self) + USER::ENT self + PPCODE: + self = lu_ent_new() + void Ent_DESTROY(self) - USER::ENT self - CODE: + USER::ENT self + CODE: lu_ent_free(self); + safefree(self) + +void +Ent_uid + USER::ENT self + PPCODE: + XPUSHs(sv_2mortal(newSViv(get_int(self, )))) + +void +Ent_uidNumber + +void +Ent_groupName + +void +Ent_gecos + +void +Ent_shell -/* Get the names of the modules which had something to do with this object. */ void -Ent_modules(self) - USER::ENT self - PPCODE: - SP = convert_value_array_list(SP, self->modules); +Ent_homeDir void Ent_add(self, val) |