mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 11:20:30 +01:00
Warn if chroot dir looks wrong
This commit is contained in:
@@ -83,6 +83,27 @@ if ($need_create) {
|
||||
exit;
|
||||
}
|
||||
|
||||
# Check for possibly invalid chroot, which shows up as missing zone files
|
||||
if (@zones && $access{'zones'} eq '*' && !$access{'ro'}) {
|
||||
my @missing;
|
||||
foreach my $z (@zones) {
|
||||
if ($z->{'type'} eq 'master' && $z->{'file'} &&
|
||||
!-r $z->{'file'}) {
|
||||
push(@missing, $z->{'file'});
|
||||
}
|
||||
}
|
||||
if (scalar(@missing) >= scalar(@zones)/2) {
|
||||
if ($chroot && $chroot ne '/') {
|
||||
print "<b>",&text('index_ewrongchroot',
|
||||
scalar(@missing), "<tt>$chroot</tt>"),"</b><p>\n";
|
||||
}
|
||||
else {
|
||||
print "<b>",&text('index_emissingchroot',
|
||||
scalar(@missing)),"</b><p>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($access{'defaults'}) {
|
||||
# display global options
|
||||
print &ui_subheading($text{'index_opts'});
|
||||
|
||||
@@ -60,7 +60,8 @@ index_massupdate=Update Records in Selected
|
||||
index_masscreate=Add Record to Selected
|
||||
index_massrdelete=Delete Records in Selected
|
||||
index_bind=BIND
|
||||
|
||||
index_ewrongchroot=Warning : The chroot directory $2 that Webmin thinks BIND is using may be incorrect. The zone files for $1 domains could not be found.
|
||||
index_emissingchroot=Warning : Webmin thinks that BIND is not using a chroot directory, but that may be incorrect. The zone files for $1 domains could not be found.
|
||||
master_title=Edit Master Zone
|
||||
master_ecannot=You are not allowed to edit this zone
|
||||
master_egone=Zone $1 does not exist in any view
|
||||
|
||||
Reference in New Issue
Block a user