1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Kernel: Make File::{chown,chmod} take credentials as input

...instead of getting them from Process::current(). :^)
This commit is contained in:
Andreas Kling 2022-08-21 16:15:29 +02:00
parent c3351d4b9f
commit 006f753647
10 changed files with 26 additions and 23 deletions

View file

@ -37,7 +37,7 @@ ErrorOr<FlatPtr> Process::sys$fchmod(int fd, mode_t mode)
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::fattr));
auto description = TRY(open_file_description(fd));
TRY(description->chmod(mode));
TRY(description->chmod(credentials(), mode));
return 0;
}