mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
SystemMonitor: Don't unveil /boot/Kernel.debug if it does not exist
If the user decided for some reason to not include Kernel debug symbols in the disk image, let's not try to unveil it.
This commit is contained in:
parent
66489ba4ad
commit
0eaee045cf
Notes:
sideshowbarker
2024-07-17 08:06:29 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/0eaee045cf Pull-request: https://github.com/SerenityOS/serenity/pull/14940
1 changed files with 4 additions and 2 deletions
|
@ -253,8 +253,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (auto result = Core::System::unveil("/usr/local/lib", "r"); result.is_error() && result.error().code() != ENOENT)
|
||||
return result.release_error();
|
||||
|
||||
// This file is only accessible when running as root
|
||||
if (auto result = Core::System::unveil("/boot/Kernel.debug", "r"); result.is_error() && result.error().code() != EACCES)
|
||||
// This file is only accessible when running as root if it is available on the disk image.
|
||||
// It might be possible to not have this file on the disk image, if the user decided to not
|
||||
// include kernel symbols for debug purposes so don't fail if the error is ENOENT.
|
||||
if (auto result = Core::System::unveil("/boot/Kernel.debug", "r"); result.is_error() && (result.error().code() != EACCES && result.error().code() != ENOENT))
|
||||
return result.release_error();
|
||||
|
||||
TRY(Core::System::unveil("/bin/Profiler", "rx"));
|
||||
|
|
Loading…
Reference in a new issue