mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibCoreDump+CrashDaemon: Compress coredumps
Most coredumps contain large amounts of consecutive null bytes and as such are a prime candidate for compression. This commit makes CrashDaemon compress files once the kernel finishes emitting them, as well as adds the functionality needed in LibCoreDump to then parse them.
This commit is contained in:
committed by
Andreas Kling
parent
b8f462a78b
commit
9f656b6fa9
@@ -72,7 +72,7 @@ RefPtr<FileDescription> CoreDump::create_target_file(const Process& process, con
|
||||
return nullptr;
|
||||
}
|
||||
auto dump_directory_metadata = dump_directory.value()->inode().metadata();
|
||||
if (dump_directory_metadata.uid != 0 || dump_directory_metadata.gid != 0 || dump_directory_metadata.mode != 040755) {
|
||||
if (dump_directory_metadata.uid != 0 || dump_directory_metadata.gid != 0 || dump_directory_metadata.mode != 040777) {
|
||||
dbgln("Refusing to put core dump in sketchy directory '{}'", output_directory);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ KResult CoreDump::write()
|
||||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
return m_fd->chmod(0400); // Make coredump file readable
|
||||
return m_fd->chmod(0600); // Make coredump file read/writable
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user