projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae283af
)
Fix call to open_lock_tempfile on a symlink
author
Jamie Cameron
<jcameron@webmin.com>
Wed, 19 Oct 2011 04:52:45 +0000
(21:52 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Wed, 19 Oct 2011 04:52:45 +0000
(21:52 -0700)
web-lib-funcs.pl
patch
|
blob
|
history
diff --git
a/web-lib-funcs.pl
b/web-lib-funcs.pl
index
aca631e
..
16a2a52
100755
(executable)
--- a/
web-lib-funcs.pl
+++ b/
web-lib-funcs.pl
@@
-8428,6
+8428,11
@@
$fh = &callers_package($fh);
my $lockfile = $file;
$lockfile =~ s/^[^\/]*//;
if ($lockfile =~ /^\//) {
+ while(-l $lockfile) {
+ # If the file is a link, follow it so that locking is done on
+ # the same file that gets unlocked later
+ $lockfile = &resolve_links($lockfile);
+ }
$main::open_templocks{$lockfile} = &lock_file($lockfile);
}
return &open_tempfile($fh, $file, $noerror, $notemp, $safe);