aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
committerRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
commite91c0b93355b28617f7c0d756026856762ece242 (patch)
tree35c4fb8ab35ec5b8d140a0b7e869848a1fac39a9 /server
parent602ff7584d3668c36b1bf5fd43988e6f45eceb48 (diff)
Imported Upstream version 0.12
Diffstat (limited to 'server')
-rw-r--r--server/keytab-backend.84
-rw-r--r--server/wallet-admin.84
-rwxr-xr-xserver/wallet-backend4
-rw-r--r--server/wallet-backend.84
-rwxr-xr-xserver/wallet-report59
-rw-r--r--server/wallet-report.827
6 files changed, 87 insertions, 15 deletions
diff --git a/server/keytab-backend.8 b/server/keytab-backend.8
index 7a08ede..2ad3d61 100644
--- a/server/keytab-backend.8
+++ b/server/keytab-backend.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.14)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "KEYTAB-BACKEND 8"
-.TH KEYTAB-BACKEND 8 "2010-03-08" "0.11" "wallet"
+.TH KEYTAB-BACKEND 8 "2010-08-25" "0.12" "wallet"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/server/wallet-admin.8 b/server/wallet-admin.8
index bc5c7ea..295fce2 100644
--- a/server/wallet-admin.8
+++ b/server/wallet-admin.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.14)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "WALLET-ADMIN 8"
-.TH WALLET-ADMIN 8 "2010-03-08" "0.11" "wallet"
+.TH WALLET-ADMIN 8 "2010-08-25" "0.12" "wallet"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/server/wallet-backend b/server/wallet-backend
index 0a611db..52e9857 100755
--- a/server/wallet-backend
+++ b/server/wallet-backend
@@ -147,7 +147,7 @@ sub command {
if ($command eq 'acl') {
my $action = shift @args;
if ($action eq 'add') {
- check_args (3, 3, [], @args);
+ check_args (3, 3, [3], @args);
$server->acl_add (@args) or failure ($server->error, @_);
} elsif ($action eq 'create') {
check_args (1, 1, [], @args);
@@ -164,7 +164,7 @@ sub command {
failure ($server->error, @_);
}
} elsif ($action eq 'remove') {
- check_args (3, 3, [], @args);
+ check_args (3, 3, [3], @args);
$server->acl_remove (@args) or failure ($server->error, @_);
} elsif ($action eq 'rename') {
check_args (2, 2, [], @args);
diff --git a/server/wallet-backend.8 b/server/wallet-backend.8
index 47b3e3b..1ecad1a 100644
--- a/server/wallet-backend.8
+++ b/server/wallet-backend.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.14)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "WALLET-BACKEND 8"
-.TH WALLET-BACKEND 8 "2010-03-08" "0.11" "wallet"
+.TH WALLET-BACKEND 8 "2010-08-25" "0.12" "wallet"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/server/wallet-report b/server/wallet-report
index 435fb73..98fd07a 100755
--- a/server/wallet-report
+++ b/server/wallet-report
@@ -8,12 +8,31 @@
# See LICENSE for licensing terms.
##############################################################################
-# Declarations and site configuration
+# Declarations and globals
##############################################################################
use strict;
use Wallet::Report;
+# The help output, sent in reply to the help command. Lists each supported
+# report command with a brief description of what it does.
+our $HELP = <<'EOH';
+Wallet reporting help:
+ acls All ACLs
+ acls duplicate ACLs that duplicate another
+ acls empty All empty ACLs
+ acls entry <scheme> <id> ACLs containing this entry (wildcarded)
+ 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 All objects
+ objects acl <acl> Objects granting permissions to that ACL
+ objects flag <flag> Objects with that flag set
+ objects owner <owner> Objects owned by that owner
+ objects type <type> Objects of that type
+ objects unused Objects that have never been stored/gotten
+EOH
+
##############################################################################
# Implementation
##############################################################################
@@ -32,8 +51,14 @@ sub command {
if (!@acls and $report->error) {
die $report->error, "\n";
}
- for my $acl (sort { $$a[1] cmp $$b[1] } @acls) {
- print "$$acl[1] (ACL ID: $$acl[0])\n";
+ if (@args && $args[0] eq 'duplicate') {
+ for my $group (@acls) {
+ print join (' ', @$group), "\n";
+ }
+ } else {
+ for my $acl (sort { $$a[1] cmp $$b[1] } @acls) {
+ print "$$acl[1] (ACL ID: $$acl[0])\n";
+ }
}
} elsif ($command eq 'audit') {
die "too many arguments to audit\n" if @args > 2;
@@ -49,6 +74,8 @@ sub command {
print join (' ', @$item), "\n";
}
}
+ } elsif ($command eq 'help') {
+ print $HELP;
} elsif ($command eq 'objects') {
die "too many arguments to objects\n" if @args > 2;
my @objects = $report->objects (@args);
@@ -110,13 +137,16 @@ B<wallet-report> takes no traditional options.
=item acls
+=item acls duplicate
+
=item acls empty
=item acls entry <scheme> <identifier>
=item acls unused
-Returns a list of ACLs in the database. ACLs will be listed in the form:
+Returns a list of ACLs in the database. Except for the C<duplicate>
+report, ACLs will be listed in the form:
<name> (ACL ID: <id>)
@@ -124,6 +154,10 @@ where <name> is the human-readable name and <id> is the numeric ID. The
numeric ID is what's used internally by the wallet system. There will be
one line per ACL.
+For the C<duplicate> report, the output will instead be one duplicate set
+per line. This will be a set of ACLs that all have the same entries.
+Only the names will be given, separated by spaces.
+
If no search type is given, all the ACLs in the database will be returned.
If a search type (and possible search arguments) are given, then the ACLs
will be limited to those that match the search.
@@ -132,6 +166,12 @@ The currently supported ACL search types are:
=over 4
+=item acls duplicate
+
+Returns all sets of ACLs that are duplicates, meaning that they contain
+exactly the same entries. Each line will be the names of the ACLs in a
+set of duplicates, separated by spaces.
+
=item acls empty
Returns all ACLs which have no entries, generally so that abandoned ACLs
@@ -167,6 +207,10 @@ where <name> is the human-readable name and <id> is the numeric ID. The
numeric ID is what's used internally by the wallet system. There will be
one line per object or ACL.
+=item help
+
+Displays a summary of all available commands.
+
=item objects
=item objects acl <acl>
@@ -177,6 +221,8 @@ one line per object or ACL.
=item objects type <type>
+=item objects unused
+
Returns a list of objects in the database. Objects will be listed in the
form:
@@ -210,6 +256,11 @@ Returns all objects owned by the given ACL name or ID.
Returns all objects of the given type.
+=item objects unused
+
+Returns all objects that have never been downloaded (have never been the
+target of a get command).
+
=back
=item owners <type-pattern> <name-pattern>
diff --git a/server/wallet-report.8 b/server/wallet-report.8
index cd56501..0600736 100644
--- a/server/wallet-report.8
+++ b/server/wallet-report.8
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.14)
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "WALLET-REPORT 8"
-.TH WALLET-REPORT 8 "2010-03-08" "0.11" "wallet"
+.TH WALLET-REPORT 8 "2010-08-25" "0.12" "wallet"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -151,6 +151,8 @@ translates command strings into method calls and returns the results.
.IP "acls" 4
.IX Item "acls"
.PD 0
+.IP "acls duplicate" 4
+.IX Item "acls duplicate"
.IP "acls empty" 4
.IX Item "acls empty"
.IP "acls entry <scheme> <identifier>" 4
@@ -158,7 +160,8 @@ translates command strings into method calls and returns the results.
.IP "acls unused" 4
.IX Item "acls unused"
.PD
-Returns a list of ACLs in the database. ACLs will be listed in the form:
+Returns a list of ACLs in the database. Except for the \f(CW\*(C`duplicate\*(C'\fR
+report, ACLs will be listed in the form:
.Sp
.Vb 1
\& <name> (ACL ID: <id>)
@@ -168,12 +171,21 @@ where <name> is the human-readable name and <id> is the numeric \s-1ID\s0. The
numeric \s-1ID\s0 is what's used internally by the wallet system. There will be
one line per \s-1ACL\s0.
.Sp
+For the \f(CW\*(C`duplicate\*(C'\fR report, the output will instead be one duplicate set
+per line. This will be a set of ACLs that all have the same entries.
+Only the names will be given, separated by spaces.
+.Sp
If no search type is given, all the ACLs in the database will be returned.
If a search type (and possible search arguments) are given, then the ACLs
will be limited to those that match the search.
.Sp
The currently supported \s-1ACL\s0 search types are:
.RS 4
+.IP "acls duplicate" 4
+.IX Item "acls duplicate"
+Returns all sets of ACLs that are duplicates, meaning that they contain
+exactly the same entries. Each line will be the names of the ACLs in a
+set of duplicates, separated by spaces.
.IP "acls empty" 4
.IX Item "acls empty"
Returns all ACLs which have no entries, generally so that abandoned ACLs
@@ -212,6 +224,9 @@ and ACLs in the form:
where <name> is the human-readable name and <id> is the numeric \s-1ID\s0. The
numeric \s-1ID\s0 is what's used internally by the wallet system. There will be
one line per object or \s-1ACL\s0.
+.IP "help" 4
+.IX Item "help"
+Displays a summary of all available commands.
.IP "objects" 4
.IX Item "objects"
.PD 0
@@ -223,6 +238,8 @@ one line per object or \s-1ACL\s0.
.IX Item "objects owner <owner>"
.IP "objects type <type>" 4
.IX Item "objects type <type>"
+.IP "objects unused" 4
+.IX Item "objects unused"
.PD
Returns a list of objects in the database. Objects will be listed in the
form:
@@ -253,6 +270,10 @@ Returns all objects owned by the given \s-1ACL\s0 name or \s-1ID\s0.
.IP "objects type <type>" 4
.IX Item "objects type <type>"
Returns all objects of the given type.
+.IP "objects unused" 4
+.IX Item "objects unused"
+Returns all objects that have never been downloaded (have never been the
+target of a get command).
.RE
.RS 4
.RE