No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smd-restricted-shell 601B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. #
  3. # Released under the terms of GPLv3 or at your option any later version.
  4. # No warranties.
  5. # Copyright Enrico Tassi <gares@fettunta.org>
  6. set -e
  7. #set -x
  8. PREFIX="@PREFIX@"
  9. if [ `echo "$PREFIX" | cut -c -1` = "@" ]; then
  10. echo "smd-restricted-shell not installed, assuming PREFIX=."
  11. WHERE="./"
  12. else
  13. WHERE="$PREFIX/bin"
  14. fi
  15. # check that SSH_ORIGINAL_COMMAND contains only
  16. # smd-client/smd-server
  17. C=`echo $SSH_ORIGINAL_COMMAND | cut -f 1 -d ' '`
  18. if [ "$C" != "$WHERE/smd-client" -a "$C" != "$WHERE/smd-server" ]; then
  19. exit 1
  20. fi
  21. # we now run the smd command
  22. exec $SSH_ORIGINAL_COMMAND