diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-14 22:10:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-14 22:12:52 +0200 |
commit | 3429b4416119fbaeebee904aff36e7d2af84a261 (patch) | |
tree | 89049ae9a89a5c4fde60a9af9a3a56fafcbc4b0a /Userland | |
parent | 5c05dfecb58b1253e7e4304a8752b961bd261fad (diff) | |
download | serenity-3429b4416119fbaeebee904aff36e7d2af84a261.zip |
LibCore: Never connect to InspectorServer if getuid() == 0
Let's just stay on the safe side with this.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibCore/EventLoop.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index 0173a5b0d8..7d95890768 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -277,11 +277,11 @@ EventLoop::EventLoop([[maybe_unused]] MakeInspectable make_inspectable) s_event_loop_stack->append(this); #ifdef __serenity__ - if (make_inspectable == MakeInspectable::Yes) { - if (!s_inspector_server_connection) { - if (!connect_to_inspector_server()) - dbgln("Core::EventLoop: Failed to connect to InspectorServer"); - } + if (getuid() != 0 + && make_inspectable == MakeInspectable::Yes + && !s_inspector_server_connection) { + if (!connect_to_inspector_server()) + dbgln("Core::EventLoop: Failed to connect to InspectorServer"); } #endif } |