From df1ed6f83043b7290d27b49c3c63fc8bcb796d5c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Sep 2008 03:39:43 -0700 Subject: Oops, open() with O_CREAT is nicer with a mode Respect the user's umask (and the number of the beast!) --- src/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/directory.c') diff --git a/src/directory.c b/src/directory.c index 06a39d7bf..c07f9edcb 100644 --- a/src/directory.c +++ b/src/directory.c @@ -1042,7 +1042,7 @@ int writeDirectoryDB(void) DEBUG("writing DB\n"); - while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT)) < 0) && + while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) && errno == EINTR); if (fd < 0) { ERROR("unable to write to db file \"%s\": %s\n", -- cgit v1.2.3