#!/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" AT $$ "$@" RETVAL=$? else trap 'ctrl_c_handler' 2 CAGEFS_TOKEN="$TOKEN" /usr/sbin/proxyexec -c cagefs.sock "$USR" "$CWD" AT $$ "$@" RETVAL=$? /bin/rm -f $PIDFILE > /dev/null 2>&1 fi exit $RETVAL
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
021cb89aa85a3e99531a54aa9423e896f2e210 | File | 16.55 KB | 0755 |
|
02d2e935b277377b51c591ef33697d6027c639 | File | 24.25 KB | 0755 |
|
File | 0 B | 0 |
|
|
File | 0 B | 0 |
|
|
File | 0 B | 0 |
|
|
File | 0 B | 0 |
|
|
67077ae55d33e89943244a99053982ce5c5c1d | File | 32.17 KB | 0755 |
|
703adff8f129480f6429074e90712499db1a89 | File | 7.77 KB | 0755 |
|
File | 0 B | 0 |
|
|
85288e7b3f9d0ea77c9a06ce208b5a3f4c91cd | File | 37.25 KB | 0755 |
|
99846949f22bb3c5ebafbdeb6da0aba16a81c4 | File | 10.88 KB | 0755 |
|
9c1ae89d848b481c7e15548b8e4a8bc105d363 | File | 1.01 KB | 0755 |
|
a4f395b292aa9b3d2ac700b56a38d62ae2161f | File | 56.12 KB | 0755 |
|
File | 0 B | 0 |
|
|
b067a71b16a16bf0e7bd31298690cf9ecf789c | File | 393.91 KB | 0755 |
|
c5f21b2fccb287cd8374972a360e614e646bad | File | 45.63 KB | 0755 |
|
dc61564029040508cb34c547740ee57f277606 | File | 346.09 KB | 0755 |
|
ee79bdffee9c961907100f8895032d76cc102d | File | 68.16 KB | 0755 |
|
f46522785a794a3111f7bc48a74115b26f4814 | File | 24.44 KB | 0755 |
|