diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-02-25 17:17:09 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-02-25 17:17:09 +0100 |
commit | c0b5836808739bcce1e5f854bd7edaa53a0d2afd (patch) | |
tree | 33456d6a7f8d2ed29ec869c41dc36da186dec923 /scripts | |
parent | ca069d41f32a7825682c3fd56f164e0a3ad64f43 (diff) | |
download | vyatta-cfg-system-c0b5836808739bcce1e5f854bd7edaa53a0d2afd.tar.gz vyatta-cfg-system-c0b5836808739bcce1e5f854bd7edaa53a0d2afd.zip |
Bug #498: dirty hack to disallow remote command execution for operator level users.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/restricted-shell | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/restricted-shell b/scripts/restricted-shell new file mode 100755 index 00000000..ffcbb53b --- /dev/null +++ b/scripts/restricted-shell @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ $# != 0 ]; then + echo "Remote command execution is not allowed for operator level users" + args=($@) + args_str=$(IFS=" " ; echo "${args[*]}") + logger "Operator level user $USER attempted remote command execution: $args_str" + exit 1 +fi + +exec vbash |