From 8a9853d5da396b6ef2dbcf92c73cd21582863afc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 23 Jan 2021 17:57:21 +0100 Subject: [PATCH] Kernel: Create core dumps with S_IFREG set (regular file) Otherwise, the VFS will refuse to create the file. --- Kernel/CoreDump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/CoreDump.cpp b/Kernel/CoreDump.cpp index 7b81f61793..b03f27da82 100644 --- a/Kernel/CoreDump.cpp +++ b/Kernel/CoreDump.cpp @@ -84,7 +84,7 @@ RefPtr CoreDump::create_target_file(const Process& process, con auto fd_or_error = VFS::the().open( lexical_path.basename(), O_CREAT | O_WRONLY | O_EXCL, - 0, // We will enable reading from userspace when we finish generating the coredump file + S_IFREG, // We will enable reading from userspace when we finish generating the coredump file *dump_directory.value(), UidAndGid { process.uid(), process.gid() });