1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:37:35 +00:00

LibCore: Never connect to InspectorServer if getuid() == 0

Let's just stay on the safe side with this.
This commit is contained in:
Andreas Kling 2021-05-14 22:10:11 +02:00
parent 5c05dfecb5
commit 3429b44161

View file

@ -277,11 +277,11 @@ EventLoop::EventLoop([[maybe_unused]] MakeInspectable make_inspectable)
s_event_loop_stack->append(this); s_event_loop_stack->append(this);
#ifdef __serenity__ #ifdef __serenity__
if (make_inspectable == MakeInspectable::Yes) { if (getuid() != 0
if (!s_inspector_server_connection) { && make_inspectable == MakeInspectable::Yes
if (!connect_to_inspector_server()) && !s_inspector_server_connection) {
dbgln("Core::EventLoop: Failed to connect to InspectorServer"); if (!connect_to_inspector_server())
} dbgln("Core::EventLoop: Failed to connect to InspectorServer");
} }
#endif #endif
} }