diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-21 16:15:29 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-21 16:15:29 +0200 |
commit | 006f75364786b1c63efe2f0905c1b5faff907afb (patch) | |
tree | 33649486c9668422e13db4ed81831fe88a6067e4 /Kernel/Syscalls | |
parent | c3351d4b9fc83c731f122de21adf52ef015aecb1 (diff) | |
download | serenity-006f75364786b1c63efe2f0905c1b5faff907afb.zip |
Kernel: Make File::{chown,chmod} take credentials as input
...instead of getting them from Process::current(). :^)
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/chmod.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/chown.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/chmod.cpp b/Kernel/Syscalls/chmod.cpp index 0b5db76bd3..76350c8889 100644 --- a/Kernel/Syscalls/chmod.cpp +++ b/Kernel/Syscalls/chmod.cpp @@ -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; } diff --git a/Kernel/Syscalls/chown.cpp b/Kernel/Syscalls/chown.cpp index 29ab8c8703..1520668c87 100644 --- a/Kernel/Syscalls/chown.cpp +++ b/Kernel/Syscalls/chown.cpp @@ -17,7 +17,7 @@ ErrorOr<FlatPtr> Process::sys$fchown(int fd, UserID uid, GroupID gid) VERIFY_NO_PROCESS_BIG_LOCK(this); TRY(require_promise(Pledge::chown)); auto description = TRY(open_file_description(fd)); - TRY(description->chown(uid, gid)); + TRY(description->chown(credentials(), uid, gid)); return 0; } |