Authen-Krb5-Admin

 view release on metacpan or  search on metacpan

Admin.xs  view on Meta::CPAN

    RETVAL

void
kadm5_get_policies(handle, exp = NULL)
    Authen::Krb5::Admin  handle
    char                *exp
  PREINIT:
    char **pols;
    int    count;
    int    i;
  PPCODE:
    err = kadm5_get_policies(handle, exp, &pols, &count);
    if (err)
        XSRETURN_EMPTY;
    EXTEND(sp, count);
    for (i = 0; i < count; i++)
        PUSHs(sv_2mortal(newSVpv(pols[i], 0)));
    kadm5_free_name_list(handle, pols, count);
    XSRETURN(count);

Authen::Krb5::Admin::Principal

Admin.xs  view on Meta::CPAN

    RETVAL

void
kadm5_get_principals(handle, exp = NULL)
    Authen::Krb5::Admin  handle
    char                *exp
  PREINIT:
    char **princs;
    int    count;
    int    i;
  PPCODE:
    err = kadm5_get_principals(handle, exp, &princs, &count);
    if (err)
        XSRETURN_EMPTY;
    EXTEND(sp, count);
    for (i = 0; i < count; i++)
        PUSHs(sv_2mortal(newSVpv(princs[i], 0)));
    kadm5_free_name_list(handle, princs, count);
    XSRETURN(count);

void

Admin.xs  view on Meta::CPAN

        XSRETURN_UNDEF;
    XSRETURN_YES;

void
kadm5_randkey_principal(handle, princ)
    Authen::Krb5::Admin     handle
    Authen::Krb5::Principal princ
  PREINIT:
    krb5_keyblock *keys;
    int            count, i;
  PPCODE:
    err = kadm5_randkey_principal(handle, princ, &keys, &count);
    if (err)
        XSRETURN_EMPTY;
    EXTEND(sp, count);
    for (i = 0; i < count; i++) {
        ST(i) = sv_newmortal();
        sv_setref_pv(ST(i), "Authen::Krb5::Keyblock", &keys[i]);
    }
    XSRETURN(count);

Admin.xs  view on Meta::CPAN

  OUTPUT:
    RETVAL

void
key_data(princ, ...)
    Authen::Krb5::Admin::Principal princ
  PROTOTYPE: $;$
  PREINIT:
    SV  **p;
    int   n;
  PPCODE:
    n = princ->kadm5_princ.n_key_data;
    if (items > 1) {
        for (p = princ->key_data; n--; p++)
            SvREFCNT_dec(*p);
        Renew(princ->key_data, items - 1, SV *);
        Renew(princ->kadm5_princ.key_data, items - 1, krb5_key_data);
        for (n = 0; n < items - 1; n++) {
            krb5_key_data *p;
            New(0, p, 1, krb5_key_data);
            Copy(INT2PTR(void *, SvIV(SvRV(ST(n + 1)))), p, 1, krb5_key_data);

Admin.xs  view on Meta::CPAN


void
db_args(princ, ...)
    Authen::Krb5::Admin::Principal princ
  PROTOTYPE: $;@
  PREINIT:
    krb5_tl_data *tl, *last_tl;
    krb5_octet **db_args;
    int i;

  PPCODE:
    /* arglist will be items - 1, but the last item should be a NULL. */
    Newxz(db_args, items, krb5_octet *);

    /* pull db args off the stack */
    /* grab the arg stack */
    for (i = 1; i < items; i++) {
        krb5_octet *this_arg;
        STRLEN length = sv_len(ST(i)) + 1;
        /* Perl_croak(aTHX_ "%d", length);*/
        Newxz(this_arg, length, krb5_octet);



( run in 1.240 second using v1.01-cache-2.11-cpan-71847e10f99 )