From 025e5ed74528cc2e8676268ad07b169949d89ae3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 13 Feb 2021 01:24:32 +0000 Subject: bugfix: ipc_bind_reuse_lock must ignore umask --- src/libstddjb/ipc_bind_reuse_lock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstddjb') diff --git a/src/libstddjb/ipc_bind_reuse_lock.c b/src/libstddjb/ipc_bind_reuse_lock.c index c872e44..09e440c 100644 --- a/src/libstddjb/ipc_bind_reuse_lock.c +++ b/src/libstddjb/ipc_bind_reuse_lock.c @@ -2,6 +2,7 @@ #include +#include #include #include #include @@ -19,7 +20,7 @@ int ipc_bind_reuse_lock (int s, char const *p, int *fdlock) char lockname[len + 6] ; memcpy(lockname, p, len) ; memcpy(lockname + len, ".lock", 6) ; - fd = openc_create(lockname) ; + fd = open3(lockname, O_WRONLY | O_NONBLOCK | O_CREAT | O_CLOEXEC, 0600) ; if (fd < 0) return -1 ; r = fd_lock(fd, 1, 1) ; if (r < 0) return -1 ; -- cgit v1.2.3