mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Use credentials object in Coredump:try_create_target_file
This commit is contained in:
parent
78813313f9
commit
8ef5dbed21
1 changed files with 2 additions and 1 deletions
|
@ -68,12 +68,13 @@ ErrorOr<NonnullLockRefPtr<OpenFileDescription>> Coredump::try_create_target_file
|
|||
dbgln("Refusing to put coredump in sketchy directory '{}'", output_directory);
|
||||
return EINVAL;
|
||||
}
|
||||
auto credentials = process.credentials();
|
||||
return TRY(VirtualFileSystem::the().open(
|
||||
KLexicalPath::basename(output_path),
|
||||
O_CREAT | O_WRONLY | O_EXCL,
|
||||
S_IFREG, // We will enable reading from userspace when we finish generating the coredump file
|
||||
*dump_directory,
|
||||
UidAndGid { process.uid(), process.gid() }));
|
||||
UidAndGid { credentials->uid(), credentials->gid() }));
|
||||
}
|
||||
|
||||
ErrorOr<void> Coredump::write_elf_header()
|
||||
|
|
Loading…
Add table
Reference in a new issue