summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-02-19 01:21:48 -0800
committerRuss Allbery <rra@stanford.edu>2010-02-19 01:21:48 -0800
commit345333f027be0b34318584b3f1b5e3e12adcaa98 (patch)
treec7b8090eb433b9c32762e40a364aeabd320b6167 /contrib
parent93eb5f8fe8d05398dd6fb364680e40eb8dae23e4 (diff)
Refactor reporting into a separate module and script
Move all reporting from Wallet::Admin to Wallet::Report and simplify the method names since they're now part of a dedicated reporting class. Similarly, create a new wallet-report script to wrap Wallet::Report, moving all reporting commands to it from wallet-admin, and simplify the commands since they're for a dedicated reporting script. Remove the contrib script wallet-report to wallet-summary so that it doesn't conflict with the new reporting backend script.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/wallet-summary (renamed from contrib/wallet-report)20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/wallet-report b/contrib/wallet-summary
index 1abe1f8..7a51f9e 100755
--- a/contrib/wallet-report
+++ b/contrib/wallet-summary
@@ -1,9 +1,9 @@
#!/usr/bin/perl -w
#
-# wallet-report -- Report on keytabs in the wallet database.
+# wallet-summarize -- Summarize keytabs in the wallet database.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2003, 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2003, 2008, 2010 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
@@ -54,10 +54,10 @@ use Wallet::Admin ();
# Return a list of keytab objects in the wallet database. Currently, we only
# report on keytab objects; reports for other objects will be added later.
sub list_keytabs {
- my $admin = Wallet::Admin->new;
- my @objects = $admin->list_objects;
- if (!@objects and $admin->error) {
- die $admin->error;
+ my $report = Wallet::Report->new;
+ my @objects = $report->objects;
+ if (!@objects and $report->error) {
+ die $report->error;
}
return map { $$_[1] } grep { $$_[0] eq 'keytab' } @objects;
}
@@ -176,11 +176,11 @@ close REPORT;
=head1 NAME
-wallet-report - Report on keytabs in the wallet database
+wallet-summary - Report on keytabs in the wallet database
=head1 SYNOPSIS
-wallet-report [B<-hm>]
+B<wallet-summary> [B<-hm>]
=head1 DESCRIPTION
@@ -189,8 +189,8 @@ report of the types of principals contained therein and the total number
of principals registered. This report is sent to standard output by
default, but see B<-m> below.
-The classifications of srvtabs are determined by a set of patterns at the
-beginning of this script. Modify it to add new classifications.
+The classifications of principals are determined by a set of patterns at
+the beginning of this script. Modify it to add new classifications.
=head1 OPTIONS