Dave Steiner > Authen-Krb5-KDB-0.09 > Authen::Krb5::KDB

Download:
Authen-Krb5-KDB-0.09.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.10   Source  

NAME ^

Authen::Krb5::KDB - Parse Kerberos V5 database dumps

SYNOPSIS ^

    use Authen::Krb5::KDB;
    $db = Authen::Krb5::KDB->new( file => 'slave_datatrans' );
    while ($p = $db->next) {
       print "Found" if ($p->name eq 'foo@TEST.ORG');
    }
    $db->close;

    use Authen::Krb5::KDB;
    $db = Authen::Krb5::KDB->new( realm => 'TEST.ORG' );
    $db->read;
    $db->close;
    $policies = $db->policies;
    foreach my $p (@{$policies}) {
        $p->print_policy;
    }

DESCRIPTION ^

Constructor and methods to parse Kerberos V5 database files, either directly from kerberos (via kdb5_util) or from already dumped files (e.g. slave_datatrans).

new()

Open the database file and return a new database object. You can either read from a file or read directly from Kerberos (done via "kdb5_util -r <realm> dump |"; this is the default).

Arguments are:

realm => <realm_name>

The realm which should be extracted via kdb5_util. This is ignored if you use the file argument.

file => <filename>

Read from a file instead of Kerberos directly.

checks => <level>

Data checking level. Level 0 means no checks; level 1 (the default) does basic checks like checking that the lengths in the records are correct; level 2 does much further consistency checks on the data.

save => 1

Save the principal objects in the database object. Normally the objects are not saved for space considerations. Note that policy objects are always kept.

next()

Returns the next principal or policy object.

read()

Reads all principals and policies. The objects are saved in the database object.

principals()

Returns a reference to array of principal objects

policies()

Returns a reference to array of policy objects

close()

Closes FH to database. It's especially important to call close when reading directly via kdb5_util to make sure there are no errors from the pipe.

AUTHOR ^

Dave Steiner, <steiner@bakerst.rutgers.edu>

COPYRIGHT ^

Copyright (c) 2002 David K. Steiner. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

perl(1), kerberos(1), Authen::Krb5::KDB::V5, Authen::Krb5::KDB::V4, Authen::Krb5::KDB::V3, Authen::Krb5::KDB::V2, Authen::Krb5::KDB_H.

syntax highlighting: