summaryrefslogtreecommitdiff
path: root/EndoForge/openssh/run-sshd
diff options
context:
space:
mode:
Diffstat (limited to 'EndoForge/openssh/run-sshd')
-rwxr-xr-xEndoForge/openssh/run-sshd28
1 files changed, 28 insertions, 0 deletions
diff --git a/EndoForge/openssh/run-sshd b/EndoForge/openssh/run-sshd
new file mode 100755
index 0000000..29615fb
--- /dev/null
+++ b/EndoForge/openssh/run-sshd
@@ -0,0 +1,28 @@
1#!/bin/sh
2case "$LD_PRELOAD" in
3 libfakeroot-sysv.so) ;;
4 '') exec fakeroot -- "$0" "$@" ;;
5 *) exit 1 ;;
6esac
7
8fixperms()
9{
10 set --
11 dirs=$HOME
12 p=$HOME
13 while [ "$p" != "${p%/*}" ]
14 do
15 p=${p%/*}
16 dirs="$dirs $p/"
17 done
18
19 chown root:root $dirs
20 chmod go-w $dirs
21}
22
23fixperms
24
25PATH=/sbin:/usr/sbin:$PATH
26cmd="$(which sshd) $*"
27runuser -u "$USER" -- sh -c "$cmd"
28