[hackers] [PATCH][sbase] mkfifo: Set initial mode

From: Richard Ipsum <richardipsum_AT_fastmail.co.uk>
Date: Sun, 9 Jun 2019 18:39:33 +0100

From POSIX:

In the symbolic_mode strings, the op characters '+' and '-'
shall be interpreted relative to an assumed initial mode of
a=rw.
---
 mkfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfifo.c b/mkfifo.c
index a09f4f5..390381b 100644
--- a/mkfifo.c
+++ b/mkfifo.c
_AT_@ -14,7 +14,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
-	mode_t mode = 0, mask;
+	mode_t mode = 0666, mask;
 	int mflag = 0, ret = 0;
 
 	ARGBEGIN {
-- 
2.21.0
Received on Sun Jun 09 2019 - 19:39:33 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 09 2019 - 20:24:25 CEST