Browse Source

Bugfix for remote command execution

pull/1/head
Marc Schoechlin 12 years ago
parent
commit
1618620d42
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      helpers/auditshell

+ 6
- 2
helpers/auditshell View File

@ -2,10 +2,14 @@
IDENT="`date --date="today" "+%Y-%m-%d_%H-%M-%S"`.`whoami`.$$"
# This is a file transfer, no audit shell neccessary
if (echo "$@"|egrep -q ".*scp.*");then
if (echo "$@"|egrep -q "^-c.*scp.*$");then
logger -t auditshell.filetransfer.${IDENT} <<< "/bin/sh $@"
exec /bin/sh "$@"
# Remote command execution
elif (echo "$@"|egrep -q "^-c.*$");then
logger -t auditshell.remotecommand.${IDENT} <<< "/bin/bash $@"
exec /bin/bash "$@"
fi
TYPESCRIPT="auditshell.typescript.${IDENT}"


Loading…
Cancel
Save