git://git.jankratochvil.net
/
nethome.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial version of sshd(8) 'sftp' wrapper.
[nethome.git]
/
src
/
sftpchroot.pl
1
#! /usr/bin/perl -T --
2
#
3
# $Id$
4
5
6
use strict;
7
use warnings;
8
9
my $CMD="/usr/libexec/openssh/sftp-server";
10
my $PATH="/tmp";
11
12
%ENV=(); # Prevent: Insecure $ENV{PATH} while running with -T switch
13
chroot $PATH or die "chroot: $PATH: $!";
14
chdir "/" or die "chdir: $!";
15
exec $CMD;
16
die "$CMD: $!";