Kernel: Create core dumps with S_IFREG set (regular file)

Otherwise, the VFS will refuse to create the file.
This commit is contained in:
Andreas Kling 2021-01-23 17:57:21 +01:00
parent cf836e6bff
commit 8a9853d5da

View file

@ -84,7 +84,7 @@ RefPtr<FileDescription> 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() });