mirror of
https://github.com/deajan/obackup.git
synced 2025-05-10 12:13:41 +02:00
ssh commands filter update
This commit is contained in:
parent
02774aeb4f
commit
9741cd3b9e
@ -1,5 +1,7 @@
|
|||||||
## Latest changelog
|
## Latest changelog
|
||||||
|
|
||||||
|
- 23/06/2013 v 1.84 RC1 approaching
|
||||||
|
- Added ssh commands filter, updated documentation
|
||||||
- Rewrote local space check function
|
- Rewrote local space check function
|
||||||
- Added ability to run another executable than rsync (see documentation on sudo execution)
|
- Added ability to run another executable than rsync (see documentation on sudo execution)
|
||||||
- Added some Rsync argument parameters (preserve ACL, Xattr, and stream compression)
|
- Added some Rsync argument parameters (preserve ACL, Xattr, and stream compression)
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
##### Obackup ssh command filter
|
##### Obackup ssh command filter
|
||||||
|
|
||||||
## Paranoia option. Only change this if you read the documentation and know what you're doing
|
## If enabled, execution of "sudo" command will be allowed.
|
||||||
|
SUDO_EXEC=yes
|
||||||
|
## Paranoia option. Don't change this unless you read the documentation and still feel concerned about security issues.
|
||||||
RSYNC_EXECUTABLE=rsync
|
RSYNC_EXECUTABLE=rsync
|
||||||
|
|
||||||
function Go
|
function Go
|
||||||
@ -20,17 +22,22 @@ case ${SSH_ORIGINAL_COMMAND%% *} in
|
|||||||
"du")
|
"du")
|
||||||
Go ;;
|
Go ;;
|
||||||
"sudo")
|
"sudo")
|
||||||
if [[ "$SSH_ORIGINAL_COMMAND" == "sudo $RSYNC_EXECUTABLE"* ]]
|
if [ "$SUDO_EXEC" == "yes" ]
|
||||||
then
|
then
|
||||||
Go
|
if [[ "$SSH_ORIGINAL_COMMAND" == "sudo $RSYNC_EXECUTABLE"* ]]
|
||||||
elif [[ "$SSH_ORIGINAL_COMMAND" == "sudo du"* ]]
|
then
|
||||||
then
|
Go
|
||||||
Go
|
elif [[ "$SSH_ORIGINAL_COMMAND" == "sudo du"* ]]
|
||||||
elif [[ "$SSH_ORIGINAL_COMMAND" == "sudo find"* ]]
|
then
|
||||||
then
|
Go
|
||||||
Go
|
elif [[ "$SSH_ORIGINAL_COMMAND" == "sudo find"* ]]
|
||||||
|
then
|
||||||
|
Go
|
||||||
|
else
|
||||||
|
echo "Sudo command not allowed."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Sudo command not allowed."
|
echo "Sudo command not enabled."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user