Don't double-enforce limited root and chroot

This commit is contained in:
Jamie Cameron
2013-08-02 06:14:29 -07:00
parent e4d0fc8709
commit ef0b41900a

View File

@@ -50,6 +50,14 @@ if (&supports_users()) {
}
&ReadParse(undef, undef, 1);
# If a chroot is forced which is under the allowed root, there is no need for
# a restrictred root
if ($in{'chroot'} && $in{'chroot'} ne '/' && $rootdir && $rootdir ne '/' &&
$in{'chroot'} =~ /^\Q$rootdir\E/) {
$rootdir = undef;
}
if ($gconfig{'os_type'} eq 'windows') {
# On Windows, chroot should be empty if not use, and default path
# should be c:/