mwrap (Perl version) user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] mymalloc.h: set mode with O_TMPFILE
@ 2023-01-07 22:09 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-01-07 22:09 UTC (permalink / raw)
  To: mwrap-perl

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 {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-07 22:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 22:09 [PATCH] mymalloc.h: set mode with O_TMPFILE Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mwrap-perl.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).