mirror of
https://github.com/webmin/webmin.git
synced 2026-09-19 20:10:38 +01:00
Don't double-enforce limited root and chroot
This commit is contained in:
@@ -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:/
|
||||
|
||||
Reference in New Issue
Block a user