summaryrefslogtreecommitdiff
path: root/perl/Wallet/Config.pm
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-03-03 22:37:18 -0800
committerRuss Allbery <rra@stanford.edu>2010-03-03 22:37:18 -0800
commita131c767d1eee7b98170962f7f9d4063be69e576 (patch)
treea1c5a182764adc50faca2f804387c081ef22ee27 /perl/Wallet/Config.pm
parent6c1f7d325239f305b9bf6a4503165cefae1ee3d8 (diff)
Add auditing for names that violate the naming policy
Add an audit command to wallet-report and one audit: objects name, which returns all objects that do not pass the local naming policy. The corresponding Wallet::Report method is audit(). Wallet::Config::verify_name may now be called with an undefined third argument (normally the user attempting to create an object). This calling convention is used when auditing, and the local policy function should select the correct policy to apply for useful audit results.
Diffstat (limited to 'perl/Wallet/Config.pm')
-rw-r--r--perl/Wallet/Config.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perl/Wallet/Config.pm b/perl/Wallet/Config.pm
index 396bf7d..2991361 100644
--- a/perl/Wallet/Config.pm
+++ b/perl/Wallet/Config.pm
@@ -14,7 +14,7 @@ use vars qw($PATH $VERSION);
# This version should be increased on any code change to this module. Always
# use two digits for the minor version with a leading zero if necessary so
# that it will sort properly.
-$VERSION = '0.04';
+$VERSION = '0.05';
# Path to the config file to load.
$PATH = $ENV{WALLET_CONFIG} || '/etc/wallet/wallet.conf';
@@ -519,6 +519,15 @@ creation. If it returns undef or the empty string, object creation will
be allowed. If it returns anything else, object creation is rejected and
the return value is used as the error message.
+This function is also called for naming audits done via Wallet::Report
+to find any existing objects that violate a (possibly updated) naming
+policy. In this case, the third argument (the identity of the person
+creating the object) will be undef. As a general rule, if the third
+argument is undef, the function should apply the most liberal accepted
+naming policy so that the audit returns only objects that violate all
+naming policies, but some sites may wish different results for their audit
+reports.
+
Please note that this return status is backwards from what one would
normally expect. A false value is success; a true value is failure with
an error message.