From ab266a02f85fd711ca5b83c5dd6e6f302776b45b Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 13 Feb 2008 01:43:27 +0000 Subject: wallet-admin now supports registering new object or ACL verifier implementations in the database. --- server/wallet-admin | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'server/wallet-admin') diff --git a/server/wallet-admin b/server/wallet-admin index 4dab7ae..4c27e9b 100755 --- a/server/wallet-admin +++ b/server/wallet-admin @@ -65,6 +65,21 @@ sub command { } else { die "only objects or acls are supported for list\n"; } + } elsif ($command eq 'register') { + die "too many arguments to register\n" if @args > 3; + die "too few arguments to register\n" if @args < 3; + my ($object, $type, $class) = @args; + if ($object eq 'object') { + unless ($admin->register_object ($type, $class)) { + die $admin->error, "\n"; + } + } elsif ($object eq 'verifier') { + unless ($admin->register_verifier ($type, $class)) { + die $admin->error, "\n"; + } + } else { + die "only object or verifier is supported for register\n"; + } } else { die "unknown command $command\n"; } @@ -141,6 +156,19 @@ be listed in the form: In both cases, there will be one line per ACL or object. +=item register (object | verifier) + +Registers an implementation of a wallet object or ACL verifier in the +wallet database. The Perl class is registered as the +implementation of an object of type or an ACL verifier of scheme +, allowing creation of objects with that type or ACL lines with that +scheme. + +All object and ACL implementations that come with wallet are registered by +default as part of database initialization, so this command is used +primarily to register local implementations of additional object types or +ACL schemes. + =back =head1 SEE ALSO -- cgit v1.2.3