Fix missing argument

open with O_CREATE need 3 args.

Signed-off-by: Karsten Keil <kkeil@suse.de>
This commit is contained in:
Karsten Keil 2008-09-03 20:57:58 +02:00
parent 7740a62116
commit 7f5c1d1e2e
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -353,7 +353,7 @@ int main(int argc, char *argv[])
/* create lock and lock! */
SPRINT(lock, "%s/lcr.lock", options.lock);
if ((lockfd = open(lock, O_CREAT | O_WRONLY)) < 0)
if ((lockfd = open(lock, O_CREAT | O_WRONLY, S_IWUSR)) < 0)
{
fprintf(stderr, "Cannot create lock file: %s\n", lock);
fprintf(stderr, "Check options.conf to change to path with permissions for you.\n");