From cfedd62b5c76fb83cecaef59edc653970c4c2869 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 9 Aug 2020 12:53:12 -0700 Subject: [PATCH] Kernel: Use Userspace for the sethostname syscall --- Kernel/Process.h | 2 +- Kernel/Syscalls/hostname.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.h b/Kernel/Process.h index 879997c2ab..a709c3c0fe 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -251,7 +251,7 @@ public: int sys$clock_settime(clockid_t, Userspace); int sys$clock_nanosleep(Userspace); int sys$gethostname(Userspace, ssize_t); - int sys$sethostname(const char*, ssize_t); + int sys$sethostname(Userspace, ssize_t); int sys$uname(utsname*); int sys$readlink(Userspace); int sys$ttyname(int fd, Userspace, size_t); diff --git a/Kernel/Syscalls/hostname.cpp b/Kernel/Syscalls/hostname.cpp index d81817d2db..490c6a169d 100644 --- a/Kernel/Syscalls/hostname.cpp +++ b/Kernel/Syscalls/hostname.cpp @@ -45,7 +45,7 @@ int Process::sys$gethostname(Userspace buffer, ssize_t size) return 0; } -int Process::sys$sethostname(const char* hostname, ssize_t length) +int Process::sys$sethostname(Userspace hostname, ssize_t length) { REQUIRE_NO_PROMISES; if (!is_superuser())