git://git.jankratochvil.net
/
nethome.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
a4f8ed4507c4ac8744d433790f5fd11e8974cba3
[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: $!";