Kernel: Require keymap loading superuser privileges
This commit is contained in:
parent
51214ea1bf
commit
ab39c6541a
|
@ -1260,6 +1260,9 @@ namespace Kernel
|
|||
LockGuard _(m_lock);
|
||||
TRY(validate_string_access(path));
|
||||
|
||||
if (!m_credentials.is_superuser())
|
||||
return BAN::Error::from_errno(EPERM);
|
||||
|
||||
auto absolute_path = TRY(absolute_path_of(path));
|
||||
TRY(Input::KeyboardLayout::get().load_from_file(absolute_path));
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue