mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-04 05:19:58 +03:00
Inspector: Throw an error when inspecting a process it has no access to
This commit is contained in:
parent
e95eb7a51d
commit
4a2dd5bf66
Notes:
sideshowbarker
2024-07-18 17:43:40 +09:00
Author: https://github.com/anandbaburajan 🔰 Commit: https://github.com/SerenityOS/serenity/commit/4a2dd5bf660 Pull-request: https://github.com/SerenityOS/serenity/pull/7302 Issue: https://github.com/SerenityOS/serenity/issues/7171
@ -97,6 +97,11 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (access(String::formatted("/proc/{}", pid).characters(), R_OK) == -1) {
|
||||
GUI::MessageBox::show(window, "Inspector doesn't have permission to access the process.", "Error", GUI::MessageBox::Type::Error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
window->set_title("Inspector");
|
||||
window->resize(685, 500);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
Loading…
Reference in New Issue
Block a user