From 4c39e1bf35a1ea30b341febdcad2aa1524509eb6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Jan 2023 22:09:06 +0000 Subject: mymalloc.h: set mode with O_TMPFILE 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) --- mymalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3-24-ge0c7