From c03da3323fb88bce8f4978a8a4ca849b1f31298d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 4 May 2009 16:19:16 +0200 Subject: specifiy mode for O_CREAT --- src/rename_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rename_device.c b/src/rename_device.c index 36d8d32e..362b23f0 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -365,7 +365,8 @@ void take_lock() { int lockfd; while (1) { - lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL); + lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + if (lockfd != -1) { write(lockfd,"%d\n",getpid()); close(lockfd); -- cgit v1.2.1