| Wallet::Report(3pm) | User Contributed Perl Documentation | Wallet::Report(3pm) |
Wallet::Report - Wallet system reporting interface
use Wallet::Report;
my $report = Wallet::Report->new;
my @objects = $report->objects ('type', 'keytab');
for my $object (@objects) {
print "@$object\n";
}
@objects = $report->audit ('objects', 'name');
Wallet::Report provides a mechanism to generate lists and reports on the contents of the wallet database. The format of the results returned depend on the type of search, but will generally be returned as a list of tuples identifying objects, ACLs, or ACL entries.
To use this object, several configuration variables must be set (at least the database configuration). For information on those variables and how to set them, see Wallet::Config. For more information on the normal user interface to the wallet server, see Wallet::Server.
For all methods that can fail, the caller should call error() after a failure to get the error message. For all methods that return lists, if they return an empty list, the caller should call error() to distinguish between an empty report and an error.
The return value for everything except "duplicate" is a list of references to pairs of ACL ID and name. For example, if there are two ACLs in the database, one with name "ADMIN" and ID 1 and one with name "group/admins" and ID 3, acls() with no arguments would return:
([ 1, 'ADMIN' ], [ 3, 'group/admins' ])
The return value for the "duplicate" search is sets of ACL names that are duplicates (have the same entries). For example, if "d1", "d2", and "d3" are all duplicates, and "o1" and "o2" are also duplicates, the result would be:
([ 'd1', 'd2', 'd3' ], [ 'o1', 'o2' ])
Returns the empty list on failure. An error can be distinguished from empty search results by calling error(). error() is guaranteed to return the error message if there was an error and undef if there was no error.
Returns the empty list on failure. An error can be distinguished from empty search results by calling error(). error() is guaranteed to return the error message if there was an error and undef if there was no error.
There are several types of searches. "type", with a given type, will return only those entries where the type matches the given type. "owner", with a given owner, will only return those objects owned by the given ACL name or ID. "flag", with a given flag name, will only return those items with a flag set to the given value. "acl" operates like "owner", but will return only those objects that have the given ACL name or ID on any of the possible ACL settings, not just owner. "unused" will return all entries for which a get command has never been issued. "unstored" will return all entries for which a store command has never been issued (limited to file type since storing isn't needed for other types).
The return value is a list of references to pairs of type and name. For example, if two objects existed in the database, both of type "keytab" and with values "host/example.com" and "foo", objects() with no arguments would return:
([ 'keytab', 'host/example.com' ], [ 'keytab', 'foo' ])
Returns the empty list on failure. To distinguish between this and an empty search result, the caller should call error(). error() is guaranteed to return the error message if there was an error and undef if there was no error.
oh_on, oh_by, oh_type, oh_name, oh_action, oh_from
Returns the empty list on failure. To distinguish between this and an empty search result, the caller should call error(). error() is guaranteed to return the error message if there was an error and undef if there was no error.
Returns the empty list on failure. To distinguish between this and no matches, the caller should call error(). error() is guaranteed to return the error message if there was an error and undef if there was no error.
Wallet::Config(3), Wallet::Server(3)
This module is part of the wallet system. The current version is available from <https://www.eyrie.org/~eagle/software/wallet/>.
Russ Allbery <eagle@eyrie.org> and Jon Robertson <jonrober@stanford.edu>.
| 2024-11-12 | perl v5.40.0 |