DCE-Perl
view release on metacpan or search on metacpan
Login/Login.xs view on Meta::CPAN
void
sec_login_import_context(package = "DCE::Login", buf_len, buf)
char *package;
unsigned32 buf_len
char * buf
PPCODE:
{
sec_login_handle_t login_context;
error_status_t status;
SV *sv;
sec_login_import_context(buf_len, buf, &login_context, &status);
BLESS_LOGIN_CONTEXT;
}
void
sec_login_export_context(login_context, buf_len)
DCE::Login login_context
unsigned32 buf_len
PPCODE:
{
char * buf;
unsigned32 len_used;
unsigned32 len_needed;
error_status_t status;
buf = malloc(buf_len);
sec_login_export_context(login_context, buf_len, buf, &len_used, &len_needed, &status);
EXTEND(sp, 3);
PUSHs_pv(buf);
PUSHs_iv(len_used);
PUSHs_iv(len_needed);
DCESTATUS;
free(buf);
}
void
sec_login_get_pwent(login_context)
DCE::Login login_context
PPCODE:
{
struct passwd *pwd;
error_status_t status;
HV *hv;
sec_login_get_pwent(login_context, (sec_login_passwd_t *)&pwd, &status);
iniHV;
hv_store(hv, "name", 4, newSVpv(pwd->pw_name,0),0);
hv_store(hv, "passwd", 6, newSVpv(pwd->pw_passwd,0),0);
hv_store(hv, "gecos", 5, newSVpv(pwd->pw_gecos,0),0);
hv_store(hv, "dir", 3, newSVpv(pwd->pw_dir,0),0);
hv_store(hv, "shell", 5, newSVpv(pwd->pw_shell,0),0);
hv_store(hv, "uid", 3, newSViv(pwd->pw_uid),0);
hv_store(hv, "gid", 3, newSViv(pwd->pw_gid),0);
/*
#ifdef something...
hv_store(hv, "class", 5, newSVpv(pwd->pw_class,0),0);
hv_store(hv, "change", 6, newSViv(pwd->pw_change),0);
hv_store(hv, "expire", 6, newSViv(pwd->pw_expire),0);
#endif
*/
XPUSHs(newRV((SV*)hv));
DCESTATUS;
}
( run in 2.330 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )