From 60b909b6308137353546f3625846a160f327ba27 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 1 Sep 2007 00:47:58 +0000 Subject: 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. --- server/wallet-backend | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'server') 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; } -- cgit v1.2.3