mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
Kernel: Add "setkeymap" pledge promise
This commit is contained in:
@@ -4295,10 +4295,11 @@ ssize_t Process::sys$getrandom(void* buffer, size_t buffer_size, unsigned int fl
|
||||
|
||||
int Process::sys$setkeymap(const Syscall::SC_setkeymap_params* user_params)
|
||||
{
|
||||
REQUIRE_PROMISE(setkeymap);
|
||||
|
||||
if (!is_superuser())
|
||||
return -EPERM;
|
||||
|
||||
REQUIRE_NO_PROMISES;
|
||||
Syscall::SC_setkeymap_params params;
|
||||
if (!validate_read_and_copy_typed(¶ms, user_params))
|
||||
return -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user