Make sure that when unlocking apache config files, it is done for the same ones that were originally locked https://www.virtualmin.com/node/40800

This commit is contained in:
Jamie Cameron
2016-05-25 02:06:53 -07:00
parent cc4b757011
commit 2b212ee3ef

View File

@@ -1334,7 +1334,8 @@ sub lock_apache_files
{
local $conf = &get_config();
local $f;
foreach $f (&unique(map { $_->{'file'} } @$conf)) {
@main::locked_apache_files = &unique(map { $_->{'file'} } @$conf);
foreach $f (@main::locked_apache_files) {
&lock_file($f);
}
}
@@ -1343,9 +1344,10 @@ sub unlock_apache_files
{
local $conf = &get_config();
local $f;
foreach $f (&unique(map { $_->{'file'} } @$conf)) {
foreach $f (@main::locked_apache_files) {
&unlock_file($f);
}
@main::locked_apache_files = ( );
}
# directive_lines(directive, ...)