From 6d0c114f57bcd554383a41c9ca791e25e95b81b5 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 3 May 2024 20:43:37 +0000 Subject: Restore cleanups in s6-ftrigrd; fix an old bug and a new bug ftrigw_clean() didn't clean properly. ftrig1_make() didn't give enough perms to the fifo, notification could fail in certain cases. Signed-off-by: Laurent Bercot --- src/libs6/ftrig1_make.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs6/ftrig1_make.c') diff --git a/src/libs6/ftrig1_make.c b/src/libs6/ftrig1_make.c index 04c8c73..5c38e4b 100644 --- a/src/libs6/ftrig1_make.c +++ b/src/libs6/ftrig1_make.c @@ -23,7 +23,7 @@ int ftrig1_make (ftrig1_t *f, char const *path) tmp[pathlen + 2 + FTRIG1_PREFIXLEN] = ':' ; if (!timestamp(tmp + pathlen + 3 + FTRIG1_PREFIXLEN)) return 0 ; memcpy(tmp + pathlen + FTRIG1_PREFIXLEN + 28, ":XXXXXX", 8) ; - ff.fd = mkptemp2(tmp, O_NONBLOCK|O_CLOEXEC) ; + ff.fd = mkptemp3(tmp, 0622, O_NONBLOCK|O_CLOEXEC) ; if (ff.fd == -1) return 0 ; ff.fdw = open_write(tmp) ; if (ff.fdw == -1) goto err1 ; -- cgit v1.2.3