#!/bin/bash ##CageFS proxyexec wrapper - ver 16 if [[ $EUID -eq 0 ]]; then echo 'Cannot be run as root' exit 1 fi USR=`/usr/bin/whoami` TOKEN=`/bin/cat /var/.cagefs/.cagefs.token` # It's user's tmp directory and write to it is secure procedure # because this script is running only under usual user PIDFILE="/tmp/.cagefs.proxy.$$" USER_INTERRUPT=13 CWD=`pwd` ctrl_c_handler() { if [[ -f "$PIDFILE" ]]; then pid=`/bin/cat $PIDFILE` /bin/rm -f $PIDFILE > /dev/null 2>&1 /bin/kill -s SIGINT "$pid" > /dev/null 2>&1 fi exit $USER_INTERRUPT } if [[ -e /var/.cagefs/origin ]]; then ORIGIN=`/bin/cat /var/.cagefs/origin` REMOTE="/usr/bin/ssh -F /etc/ssh/cagefs-rexec_config $USR@$ORIGIN" $REMOTE CAGEFS_TOKEN="$TOKEN" /usr/sbin/proxyexec -c cagefs.sock "$USR" "$CWD" USERDOMAINS $$ "$@" RETVAL=$? else trap 'ctrl_c_handler' 2 CAGEFS_TOKEN="$TOKEN" /usr/sbin/proxyexec -c cagefs.sock "$USR" "$CWD" USERDOMAINS $$ "$@" RETVAL=$? /bin/rm -f $PIDFILE > /dev/null 2>&1 fi exit $RETVAL
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
0104a83db8d3f1178b048af6311637384aada2 | File | 25.52 KB | 0755 |
|
File | 0 B | 0 |
|
|
17ac32831a51472ab74b9728194d2164950a3f | File | 11.78 KB | 0755 |
|
File | 0 B | 0 |
|
|
278a69b5a3ba3e00d1959180312ee386a3800c | File | 669.48 KB | 0755 |
|
2809968c33191b5284f4b6fbc490472402c227 | File | 29.09 KB | 0755 |
|
2b0419ff46225618657c150b0e8e0c53091163 | File | 662.54 KB | 0755 |
|
2c6da686854e3be443a7f545e738a3452fcd03 | File | 80.09 KB | 0755 |
|
File | 0 B | 0 |
|
|
File | 0 B | 0 |
|
|
80d4ad2f5c5803a3cd7eaa72b473af4bfc6277 | File | 5.51 MB | 0755 |
|
8b82bff21919b7646120f9072c82eebdf9b868 | File | 148.73 KB | 0755 |
|
984a57ccd123012703b38f084bedd8d8ca402c | File | 46.75 KB | 0755 |
|
9da13ddf0319dd701ef56462e1fb5d4d90931c | File | 151.01 KB | 0755 |
|
a90a994de1d42f7c1d1aaa740565d256746e01 | File | 1.03 KB | 0755 |
|
b04775601bbb150039fe50a547393fb2f5ef7a | File | 32.17 KB | 0755 |
|
d6b79405f03e70371c4403fd3acceeb501780d | File | 15.72 KB | 0755 |
|
dafc5f71f2cfa345f8adc7bc0323ba760d0dab | File | 35.55 KB | 0755 |
|
File | 0 B | 0 |
|