--- server/wallet-backend 2016-01-17 19:13:02.000000000 -0800
+++ /dev/null 2016-01-23 14:00:27.000000000 -0800
-# Wallet server for storing and retrieving secure data.
-use Getopt::Long qw(GetOptions);
-use Sys::Syslog qw(openlog syslog);
-# Set to zero to suppress syslog logging, which is used for testing and for
-# the -q option. Set to a reference to a string to append messages to that
-$SYSLOG = 1 unless defined $SYSLOG;
-##############################################################################
-##############################################################################
- openlog ('wallet-backend', 'pid', 'auth');
-# Get an identity string for the user suitable for including in log messages.
- if ($ENV{REMOTE_USER}) {
- $identity = $ENV{REMOTE_USER};
- my $host = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR};
- $identity .= " ($host)" if $host;
-# Log an error message to both syslog and to stderr and exit with a non-zero
- my $message = join ('', @_);
- my $identity = identity;
- $log = "error for $identity: $message";
- $log = "error: $message";
- $log =~ s/[^\x20-\x7e]/_/g;
- syslog ('err', "%s", $log);
-# Log a wallet failure message for a given command to both syslog and to
-# stderr and exit with a non-zero status. Takes the message and the command
- my ($message, @command) = @_;
- my $log = "command @command from " . identity . " failed: $message";
- $log =~ s/[^\x20-\x7e]/_/g;
- syslog ('err', "%s", $log);
-# Log a wallet success message for a given command.
- my $log = "command @command from " . identity . " succeeded";
- $log =~ s/[^\x20-\x7e]/_/g;