aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--USER/USER.xs96
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)