From f5adcfc9660c2c05715c913e712cf6515a791807 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 18 Sep 2007 20:21:31 +0000 Subject: Add flag clear and flag set to the public interface. --- server/wallet-backend | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) (limited to 'server') diff --git a/server/wallet-backend b/server/wallet-backend index 8777990..1eafee5 100755 --- a/server/wallet-backend +++ b/server/wallet-backend @@ -109,6 +109,17 @@ sub command { die $server->error; } } + } elsif ($command eq 'flag') { + my $action = shift @args; + if ($action eq 'clear') { + check_args (3, [], @args); + $server->flag_clear (@args) or die $server->error; + } elsif ($action eq 'set') { + check_args (3, [], @args); + $server->flag_set (@args) or die $server->error; + } else { + die "unknown command flag $action\n"; + } } elsif ($command eq 'get') { check_args (2, [], @args); my $output = $server->get (@args); @@ -202,11 +213,11 @@ B takes no traditional options. =head1 COMMANDS Most commands are only available to wallet administrators (users on the -C ACL). The exceptions are C, C, C, and -C. All of those commands have their own ACLs, and if the -appropriate ACL is set, it alone is checked to see if the user has access. -Otherwise, C, C, and C access is permitted if the user is -authorized by the owner ACL of the object. +C ACL). The exceptions are C, C, C, C, +C, and C. All of those commands have their own ACLs, +and if the appropriate ACL is set, it alone is checked to see if the user +has access. Otherwise, C, C, and C access is permitted if +the user is authorized by the owner ACL of the object. Administrators can run any command on any object or ACL except for C and C. For C and C, they must still be authorized by @@ -272,12 +283,24 @@ the object. Currently, the expiration of an object is not used. -=item get +=item flag clear + +Clears the flag on the object identified by and . + +=item flag set + +Sets the flag on the object identified by and . +Recognized flags are C, which prevents all further actions on that +object until the flag is cleared, and C, which tells the object +backend to not generate new data on get but instead return the same data as +previously returned. The C flag is not meaningful for objects +that do not generate new data on the fly. + +=item get -Prints to standard output the data associated with the object identified -by and , or stores it in a file if the B<-f> option was -given. This may trigger generation of new data and invalidate old data -for that object depending on the object type. +Prints to standard output the data associated with the object identified by + and . This may trigger generation of new data and invalidate +old data for that object depending on the object type. =item getacl -- cgit v1.2.3