diff options
author | Leah Neukirchen <leah@vuxu.org> | 2019-02-03 17:17:32 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2019-02-03 17:17:32 +0100 |
commit | 6645e80324bd259a2d3b3b372f472bfa05fd51a6 (patch) | |
tree | f4818b8e00cc380771e2a4149ab4a4717acab923 | |
parent | 5a2c6747b69a312e350b658b4446f845f70b671d (diff) | |
download | mblaze-6645e80324bd259a2d3b3b372f472bfa05fd51a6.tar.gz mblaze-6645e80324bd259a2d3b3b372f472bfa05fd51a6.tar.xz mblaze-6645e80324bd259a2d3b3b372f472bfa05fd51a6.zip |
mdeliver: force mode 0600 for pipes (BSD gives 0000 here by default)
-rw-r--r-- | mdeliver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mdeliver.c b/mdeliver.c index 41d1e01..cbded45 100644 --- a/mdeliver.c +++ b/mdeliver.c @@ -88,6 +88,8 @@ tryagain: struct stat st; if (fstat(fileno(infile), &st) < 0) st.st_mode = 0600; + if (S_ISFIFO(st.st_mode)) + st.st_mode = 0600; outfd = open(tmp, O_CREAT | O_WRONLY | O_EXCL, st.st_mode & 07777); if (outfd < 0) { |