summaryrefslogtreecommitdiffstats
path: root/libebtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libebtc.c')
-rw-r--r--libebtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libebtc.c b/libebtc.c
index 1b058ef..112c307 100644
--- a/libebtc.c
+++ b/libebtc.c
@@ -144,7 +144,7 @@ static int lock_file()
int fd, try = 0;
retry:
- fd = open(LOCKFILE, O_CREAT|O_CLOEXEC, 00600);
+ fd = open(LOCKFILE, O_CREAT|O_WRONLY|O_CLOEXEC, 00600);
if (fd < 0) {
if (try == 1 || mkdir(dirname(pathbuf), 00700))
return -2;