mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Kernel: Disable big process lock in sys$gethostname() sys$sethostname()
This commit is contained in:
parent
9201a06027
commit
10ce896d4f
Notes:
sideshowbarker
2024-07-18 08:42:43 +09:00
Author: https://github.com/bgianfo
Commit: 10ce896d4f
Pull-request: https://github.com/SerenityOS/serenity/pull/8864
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/gunnarbeutner ✅
Reviewed-by: https://github.com/tomuta ✅
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ extern Mutex* g_hostname_lock;
|
|||
|
||||
KResultOr<FlatPtr> Process::sys$gethostname(Userspace<char*> buffer, size_t size)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
VERIFY_NO_PROCESS_BIG_LOCK(this)
|
||||
REQUIRE_PROMISE(stdio);
|
||||
if (size > NumericLimits<ssize_t>::max())
|
||||
return EINVAL;
|
||||
|
@ -27,7 +27,7 @@ KResultOr<FlatPtr> Process::sys$gethostname(Userspace<char*> buffer, size_t size
|
|||
|
||||
KResultOr<FlatPtr> Process::sys$sethostname(Userspace<const char*> hostname, size_t length)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
VERIFY_NO_PROCESS_BIG_LOCK(this)
|
||||
REQUIRE_NO_PROMISES;
|
||||
if (!is_superuser())
|
||||
return EPERM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue