aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--config/wallet1
-rwxr-xr-xserver/wallet-backend1
-rw-r--r--tests/server/backend-t.in9
4 files changed, 12 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 5a6c912..e16c630 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ wallet 0.10 (unreleased)
Correctly handle storing of data that begins with a dash and don't
parse it as an argument to wallet-backend.
+ Fix logging in wallet-backend and the remctl configuration to not log
+ the data passed to store.
+
wallet 0.9 (2008-04-24)
The wallet command-line client now reads the data for store from a
diff --git a/config/wallet b/config/wallet
index d3f745d..2e0b142 100644
--- a/config/wallet
+++ b/config/wallet
@@ -3,4 +3,5 @@
# This is a remctld configuration fragment to run wallet-backend, which
# implements the server side of the wallet system.
+wallet store /usr/sbin/wallet-backend logmask=4 ANYUSER
wallet ALL /usr/sbin/wallet-backend ANYUSER
diff --git a/server/wallet-backend b/server/wallet-backend
index ff63ba8..c427526 100755
--- a/server/wallet-backend
+++ b/server/wallet-backend
@@ -287,6 +287,7 @@ sub command {
} elsif ($command eq 'store') {
check_args (3, 3, [3], @args);
$server->store (@args) or failure ($server->error, @_);
+ splice (@_, 3);
} else {
error "unknown command $command";
}
diff --git a/tests/server/backend-t.in b/tests/server/backend-t.in
index bc708f2..e1518d8 100644
--- a/tests/server/backend-t.in
+++ b/tests/server/backend-t.in
@@ -255,7 +255,7 @@ for my $command (sort keys %commands) {
($out, $err) = run_backend ($command, @args);
if ($command eq 'store' and $arg == 2) {
is ($err, '', 'Store allows any characters');
- is ($OUTPUT, "command $command @args from admin (1.2.3.4)"
+ is ($OUTPUT, "command $command @args[0,1] from admin (1.2.3.4)"
. " succeeded\n", ' and success logged');
is ($out, "$new\nstore foobar foobar foo;bar\n",
' and calls the right method');
@@ -327,7 +327,12 @@ for my $command (qw/autocreate create destroy setacl setattr store/) {
my @extra = ('foo') x ($commands{$command}[0] - 2);
my $extra = @extra ? join (' ', '', @extra) : '';
($out, $err) = run_backend ($command, 'type', 'name', @extra);
- my $ran = "$command type name" . (@extra ? " @extra" : '');
+ my $ran;
+ if ($command eq 'store') {
+ $ran = "$command type name";
+ } else {
+ $ran = "$command type name" . (@extra ? " @extra" : '');
+ }
is ($err, '', "Command $command ran with no errors");
is ($OUTPUT, "command $ran from admin (1.2.3.4) succeeded\n",
' and success logged');