diff options
Diffstat (limited to 'EndoForge/openssh/run-sshd')
-rwxr-xr-x | EndoForge/openssh/run-sshd | 32 |
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 | |||
7 | case "$LD_PRELOAD" in | ||
8 | libfakeroot-sysv.so) ;; | ||
9 | '') exec fakeroot -- "$0" "$@" ;; | ||
10 | *) exit 1 ;; | ||
11 | esac | ||
12 | |||
13 | fixperms() | ||
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 | |||
27 | fixperms "$HOME"/.ssh | ||
28 | |||
29 | PATH=/sbin:/usr/sbin:$PATH | ||
30 | cmd="$(which sshd) $*" | ||
31 | runuser -u "$USER" -- sh -c "$cmd" | ||
32 | |||