From 5bb6ddc75d292db0eaf93fca4eb82684ff4a5e1c Mon Sep 17 00:00:00 2001 From: program-- Date: Tue, 19 Sep 2023 06:38:05 -0700 Subject: [PATCH] fix: specify mode for ::open call --- include/utilities/mmap_allocator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/utilities/mmap_allocator.hpp b/include/utilities/mmap_allocator.hpp index 3e795782bd..2a7232186f 100644 --- a/include/utilities/mmap_allocator.hpp +++ b/include/utilities/mmap_allocator.hpp @@ -129,7 +129,7 @@ struct basic_pool { name += "/ngen_mmap_XXXXXX"; mkstemp(&name[0]); - const int fd = ::open(name.c_str(), O_CREAT | O_RDWR | O_TRUNC); + const int fd = ::open(name.c_str(), O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR); ::unlink(name.c_str()); return fd;