aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-09-01 00:47:58 +0000
committerRuss Allbery <rra@stanford.edu>2007-09-01 00:47:58 +0000
commit60b909b6308137353546f3625846a160f327ba27 (patch)
tree725eca8d95c35b1a891373a709f30dba8e2cfbbb
parentd365eeaa68672f435db87e191b9cd86ac44e3e57 (diff)
Add acl destroy as a command, add newlines after the owner, expires, and
getacl returns, and handle undef returns from owner, expires, and getacl that aren't errors.
-rwxr-xr-xserver/wallet-backend15
1 files changed, 12 insertions, 3 deletions
diff --git a/server/wallet-backend b/server/wallet-backend
index 6fed995..4757d45 100755
--- a/server/wallet-backend
+++ b/server/wallet-backend
@@ -71,6 +71,9 @@ if ($command eq 'acl') {
} elsif ($action eq 'create') {
check_args (1, [], @args);
$server->acl_create (@args) or die $server->error;
+ } elsif ($action eq 'destroy') {
+ check_args (1, [], @args);
+ $server->acl_destroy (@args) or die $server->error;
} elsif ($action eq 'remove') {
check_args (3, [], @args);
$server->acl_remove (@args) or die $server->error;
@@ -92,7 +95,9 @@ if ($command eq 'acl') {
check_args (2, [], @args);
my $output = $server->expires (@args);
if (defined $output) {
- print $output;
+ print $output, "\n";
+ } elsif (not $server->error) {
+ print "No expiration set\n";
} else {
die $server->error;
}
@@ -109,7 +114,9 @@ if ($command eq 'acl') {
check_args (3, [], @args);
my $output = $server->acl (@args);
if (defined $output) {
- print $output;
+ print $output, "\n";
+ } elsif (not $server->error) {
+ print "No ACL set\n";
} else {
die $server->error;
}
@@ -121,7 +128,9 @@ if ($command eq 'acl') {
check_args (2, [], @args);
my $output = $server->owner (@args);
if (defined $output) {
- print $output;
+ print $output, "\n";
+ } elsif (not $server->error) {
+ print "No owner set\n";
} else {
die $server->error;
}