From d19cc92e749afe9486c3ee50d35ab746bf265cb2 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 23 Jun 2013 23:11:35 +0200 Subject: [PATCH] Update ssh filter logging. --- obackup_ssh_filter.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/obackup_ssh_filter.sh b/obackup_ssh_filter.sh index 50e0ca5..45c4a61 100755 --- a/obackup_ssh_filter.sh +++ b/obackup_ssh_filter.sh @@ -14,7 +14,7 @@ CMD1= CMD2= CMD3= -LOG_FILE=/var/log/obackup_ssh_filter.log +LOG_FILE=~/.ssh/obackup_ssh_filter.log function Log { @@ -68,15 +68,12 @@ case ${SSH_ORIGINAL_COMMAND%% *} in then Go else - Log "Sudo command not allowed." - Log "$SSH_ORIGINAL_COMMAND" 1 + Log "Command [$SSH_ORIGINAL_COMMAND] not allowed." fi else - Log "Sudo command not enabled." - Log "$SSH_ORIGINAL_COMMAND" 1 + Log "Command [$SSH_ORIGINAL_COMMAND] not allowed. sudo not enabled." fi ;; *) - Log "Not allowed." - Log "$SSH_ORIGINAL_COMMAND" 1 + Log "Command [$SSH_ORIGINAL_COMMAND] not allowed." esac