about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-07 22:09:06 +0000
committerEric Wong <mwrap-perl@80x24.org>2023-01-07 22:22:30 +0000
commit4c39e1bf35a1ea30b341febdcad2aa1524509eb6 (patch)
tree2330f7445d73b7c79f10b816a2a39b444c2acb99
parent59dff045a1df2959ab159f926523b1f52ba3e3bf (diff)
downloadmwrap-4c39e1bf35a1ea30b341febdcad2aa1524509eb6.tar.gz
Although we never vivify the O_TMPFILE to an non-FS path (via
linkat(2)), glibc may still complain about it since it doesn't
know we never call linkat(2)
-rw-r--r--mymalloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mymalloc.h b/mymalloc.h
index eda669f..6b5a22d 100644
--- a/mymalloc.h
+++ b/mymalloc.h
@@ -65,7 +65,7 @@ static void *my_mmap(size_t size)
         if (!tmpdir)
                 tmpdir = "/tmp";
 
-        fd = open(tmpdir, O_TMPFILE|O_RDWR|S_IRUSR|S_IWUSR);
+        fd = open(tmpdir, O_TMPFILE|O_RDWR|S_IRUSR|S_IWUSR, 0600);
         if (fd < 0) {
                 flags |= MAP_ANONYMOUS;
         } else {