summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKarsten Keil2008-09-03 20:57:58 +0200
committerKarsten Keil2008-09-03 20:57:58 +0200
commit7f5c1d1e2e0b6b2de2cef6a23b68eed17d075baa (patch)
treef319712357c401ce481918138d7d611f0d254294 /main.c
parentFix possible bufferoverflows (diff)
downloadlcr-7f5c1d1e2e0b6b2de2cef6a23b68eed17d075baa.tar.gz
lcr-7f5c1d1e2e0b6b2de2cef6a23b68eed17d075baa.tar.xz
lcr-7f5c1d1e2e0b6b2de2cef6a23b68eed17d075baa.zip
Fix missing argument
open with O_CREATE need 3 args. Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1cb316f..2335067 100644
--- 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);
- 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");