From f5322e41ae8fa0124bb5adcb3ef12db6ebeabeab Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 8 Jan 2019 16:39:54 +0000 Subject: Proper use of umask for mk[bcp]temp --- src/libposixplz/mkptemp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libposixplz/mkptemp.c') diff --git a/src/libposixplz/mkptemp.c b/src/libposixplz/mkptemp.c index 42bc715..64ddb5c 100644 --- a/src/libposixplz/mkptemp.c +++ b/src/libposixplz/mkptemp.c @@ -7,7 +7,9 @@ static int f (char const *fn, mode_t mode, void *data) { + mode_t m = umask(0) ; int r = mkfifo(fn, mode) ; + umask(m) ; if (r == -1) return -1 ; r = open_readb(fn) ; if (r == -1) unlink_void(fn) ; -- cgit v1.2.3