diff options
author | Christian Breunig <christian@breunig.cc> | 2024-06-30 07:35:25 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-03 15:05:02 +0000 |
commit | 7aa420e5a5509793030350acb9c108eaef6c79ea (patch) | |
tree | 5318e1a5d2ff7fc3b7e0cf7e4a647c85fa9bfe07 /src/opt/vyatta/bin | |
parent | 3817a83f0af6f7a97e1fb822d0e5da844068100f (diff) | |
download | vyos-1x-7aa420e5a5509793030350acb9c108eaef6c79ea.tar.gz vyos-1x-7aa420e5a5509793030350acb9c108eaef6c79ea.zip |
T6527: add legacy Vyatta interpreter files still in use
(cherry picked from commit 72a704d2e2b06bfedc4f1ee841814f983fc34baa)
Diffstat (limited to 'src/opt/vyatta/bin')
-rwxr-xr-x | src/opt/vyatta/bin/restricted-shell | 11 | ||||
-rwxr-xr-x | src/opt/vyatta/bin/vyatta-op-cmd-wrapper | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/opt/vyatta/bin/restricted-shell b/src/opt/vyatta/bin/restricted-shell new file mode 100755 index 000000000..ffcbb53b7 --- /dev/null +++ b/src/opt/vyatta/bin/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 diff --git a/src/opt/vyatta/bin/vyatta-op-cmd-wrapper b/src/opt/vyatta/bin/vyatta-op-cmd-wrapper new file mode 100755 index 000000000..a89211b2b --- /dev/null +++ b/src/opt/vyatta/bin/vyatta-op-cmd-wrapper @@ -0,0 +1,6 @@ +#!/bin/vbash +shopt -s expand_aliases +source /etc/default/vyatta +source /etc/bash_completion.d/vyatta-op +_vyatta_op_init +_vyatta_op_run "$@" |