summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-12-15 21:38:00 +0100
committerLeah Neukirchen <leah@vuxu.org>2021-12-15 21:38:00 +0100
commite50b606d352b11e59c5ccf22efe308b44853f320 (patch)
treec1a741ba9af1ae2887c38fbec462a9d515d24553
parent9cf44c27876b3236de12fa60ff9d207f02328aa1 (diff)
downloadnq-e50b606d352b11e59c5ccf22efe308b44853f320.tar.gz
nq-e50b606d352b11e59c5ccf22efe308b44853f320.tar.xz
nq-e50b606d352b11e59c5ccf22efe308b44853f320.zip
nq: change default permissions to 0666 (subject to umask)
This should be the default behavior for programs creating new files.
-rw-r--r--nq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nq.c b/nq.c
index 10ae988..564782d 100644
--- a/nq.c
+++ b/nq.c
@@ -280,7 +280,7 @@ usage:
 	snprintf(lockfile, sizeof lockfile,
 	    ".,%011" PRIx64 ".%d", ms, getpid());
 	lockfd = openat(dirfd, lockfile,
-	    O_CREAT | O_EXCL | O_RDWR | O_APPEND, 0600);
+	    O_CREAT | O_EXCL | O_RDWR | O_APPEND, 0666);
 	if (lockfd < 0) {
 		perror("open");
 		exit(222);