summaryrefslogtreecommitdiff
path: root/EndoForge/openssh/run-sshd
diff options
context:
space:
mode:
Diffstat (limited to 'EndoForge/openssh/run-sshd')
-rwxr-xr-xEndoForge/openssh/run-sshd32
1 files changed, 0 insertions, 32 deletions
diff --git a/EndoForge/openssh/run-sshd b/EndoForge/openssh/run-sshd
deleted file mode 100755
index 20e82d8..0000000
--- a/EndoForge/openssh/run-sshd
+++ /dev/null
@@ -1,32 +0,0 @@
1#!/bin/sh
2# Fix file ownership with fakeroot so that OpenSSH will run as a user.
3#
4# The ownership is not really changed on disk, but 'chmod go-w' might actually
5# change permissions on disk.
6
7case "$LD_PRELOAD" in
8 libfakeroot-sysv.so) ;;
9 '') exec fakeroot -- "$0" "$@" ;;
10 *) exit 1 ;;
11esac
12
13fixperms()
14{
15 set -- "$1"
16 local p="$1" oldp=
17 while [ "$p" != "$oldp" ]
18 do
19 oldp=$p
20 p=${p%/*}/
21 set -- "$@" "$p"
22 done
23 chown root:root "$@"
24 chmod go-w "$@"
25}
26
27fixperms "$HOME"/.ssh
28
29PATH=/sbin:/usr/sbin:$PATH
30cmd="$(which sshd) $*"
31runuser -u "$USER" -- sh -c "$cmd"
32