summaryrefslogtreecommitdiff
path: root/scripts/restricted-shell
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-02-25 17:17:09 +0100
committerDaniil Baturin <daniil@baturin.org>2015-02-25 17:17:09 +0100
commitc0b5836808739bcce1e5f854bd7edaa53a0d2afd (patch)
tree33456d6a7f8d2ed29ec869c41dc36da186dec923 /scripts/restricted-shell
parentca069d41f32a7825682c3fd56f164e0a3ad64f43 (diff)
downloadvyatta-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/restricted-shell')
-rwxr-xr-xscripts/restricted-shell11
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