O_CREATE needs mode

master
Joey Hess 2008-11-11 15:53:55 -05:00
parent 9a48669f1e
commit eef8b966b3
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ EOF
# the benefit of this optimisation.
$check_commit_hook=<<"EOF";
{
int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR);
int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR, 0666);
if (fd != -1) {
if (flock(fd, LOCK_SH | LOCK_NB) != 0)
exit(0);
@ -75,7 +75,7 @@ EOF
# otherwise.
$pre_exec=<<"EOF";
{
int fd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR);
int fd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666);
if (fd != -1)
flock(fd, LOCK_EX);
}