diff options
author | Russ Allbery <rra@stanford.edu> | 2008-02-13 01:43:27 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-02-13 01:43:27 +0000 |
commit | ab266a02f85fd711ca5b83c5dd6e6f302776b45b (patch) | |
tree | f1f4ab218b89b42b87759d11db95ec906e82c239 /server/wallet-admin | |
parent | d5ae985df14efb9afcd86a38f8f6599421a4b5cf (diff) |
wallet-admin now supports registering new object or ACL verifier
implementations in the database.
Diffstat (limited to 'server/wallet-admin')
-rwxr-xr-x | server/wallet-admin | 28 |
1 files changed, 28 insertions, 0 deletions
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) <type> <class> + +Registers an implementation of a wallet object or ACL verifier in the +wallet database. The Perl class <class> is registered as the +implementation of an object of type <type> or an ACL verifier of scheme +<type>, 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 |