Fix missing argument
authorKarsten Keil <kkeil@suse.de>
Wed, 3 Sep 2008 18:57:58 +0000 (20:57 +0200)
committerKarsten Keil <kkeil@suse.de>
Wed, 3 Sep 2008 18:57:58 +0000 (20:57 +0200)
open with O_CREATE need 3 args.

Signed-off-by: Karsten Keil <kkeil@suse.de>
main.c

diff --git a/main.c b/main.c
index 1cb316f..2335067 100644 (file)
--- a/main.c
+++ b/main.c
@@ -353,7 +353,7 @@ int main(int argc, char *argv[])
 
        /* create lock and lock! */
        SPRINT(lock, "%s/lcr.lock", options.lock);
 
        /* 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");
        {
                fprintf(stderr, "Cannot create lock file: %s\n", lock);
                fprintf(stderr, "Check options.conf to change to path with permissions for you.\n");