From e8917cc5f36d5862656e56959127ed391ec0d9ff Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 9 Aug 2020 15:39:05 -0700 Subject: [PATCH] Kernel: Use Userspace for the chroot syscall --- Kernel/Process.h | 2 +- Kernel/Syscalls/chroot.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.h b/Kernel/Process.h index 195ac60f4e..0795dcd038 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -332,7 +332,7 @@ public: int sys$futex(Userspace); int sys$set_thread_boost(pid_t tid, int amount); int sys$set_process_boost(pid_t, int amount); - int sys$chroot(const char* path, size_t path_length, int mount_flags); + int sys$chroot(Userspace path, size_t path_length, int mount_flags); int sys$pledge(Userspace); int sys$unveil(Userspace); int sys$perf_event(int type, FlatPtr arg1, FlatPtr arg2); diff --git a/Kernel/Syscalls/chroot.cpp b/Kernel/Syscalls/chroot.cpp index 1e223813fd..73ba127967 100644 --- a/Kernel/Syscalls/chroot.cpp +++ b/Kernel/Syscalls/chroot.cpp @@ -31,7 +31,7 @@ namespace Kernel { -int Process::sys$chroot(const char* user_path, size_t path_length, int mount_flags) +int Process::sys$chroot(Userspace user_path, size_t path_length, int mount_flags) { if (!is_superuser()) return -EPERM;