#33 Patch for .lock file bug in apache module


From Spain and sorry for my poor english.

The common method in webmin for locking files is to
create another file .lock, causing others process that
tray to create a file with the same name to wait for.
(see lock_file sub in /web-lib.pl). The content of
this files is only a number with no function (this
appear to me because is not read in any place). You can
confirm that?

This cause a bug in apache module if is configured to
save the Virtual Servers not in httpd.conf, not in a
concrete file, but in a directory. In that case the
behavior is to create in this directory a file for each
Virtual Server with the $domain.conf name pattern and
insert a "include path-to-directory" in the httpd.conf.
When apache start read all the files in this
directory, without exceptions.

When creating/modifing Virtual Servers, apache module
lock any file in this directory (creating a .lock file
with a number in), and this cause errors in apache
test-config. The test is over all the files, including
the .lock files and the number is not a apache directive:

Syntax error on line 1 of
Invalid command '1844', perhaps mis-spelled or defined
by a module not included in the server configuration

For fixed this 'bug' i think that we only need to
comment the number of the .lock files with '#',
previusly confirming that this number has no function
in any place.

sub lock_file {
print LOCKING '#',$$,"\n";

do you agree?



  • Jamie Cameron

    Jamie Cameron - 2004-04-27

    Logged In: YES

    For reasons that I have discussed with the author of this
    patch, I've implemented a different solution to the same
    problem in Webmin version 1.140.

  • Jamie Cameron

    Jamie Cameron - 2004-04-27
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks