--- server/wallet-report 2016-01-17 19:13:02.000000000 -0800
+++ /dev/null 2016-01-23 14:00:27.000000000 -0800
-# Wallet server reporting interface.
-# The help output, sent in reply to the help command. Lists each supported
-# report command with a brief description of what it does.
- acls duplicate ACLs that duplicate another
- acls empty All empty ACLs
- acls entry <scheme> <id> ACLs containing this entry (wildcarded)
- acls nesting <acl> ACLs containing this ACL as a nested entry
- acls unused ACLs that are not referenced by any object
- audit acls name ACLs failing the naming policy
- audit objects name Objects failing the naming policy
- objects acl <acl> Objects granting permissions to that ACL
- objects flag <flag> Objects with that flag set
- objects history History of all objects
- objects host <hostname> All host-based objects for a specific host
- objects owner <owner> Objects owned by that owner
- objects type <type> Objects of that type
- objects unused Objects that have never been gotten
- objects unstored Objects that have never been stored
- owners <type> <name> All ACL entries owning matching objects
- schemes All configured ACL schemes
- types All configured wallet types
-##############################################################################
-##############################################################################
-# Parse and execute a command. We wrap this in a subroutine call for easier
- die "Usage: wallet-report <command> [<args> ...]\n" unless @_;
- my $report = Wallet::Report->new;
- # Parse command-line options and dispatch to the appropriate calls.
- my ($command, @args) = @_;
- if ($command eq 'acls') {
- die "too many arguments to acls\n" if @args > 3;
- my @acls = $report->acls (@args);
- if (!@acls and $report->error) {
- die $report->error, "\n";
- if (@args && $args[0] eq 'duplicate') {
- for my $group (@acls) {
- print join (' ', @$group), "\n";
- for my $acl (sort { $$a[1] cmp $$b[1] } @acls) {