mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
strace: Pledge rpath
for searching binaries
After commit 91a03bc6ae
we no longer try
to discover files for exec-ing by simply trying to exec on them, but we
check for the files existence by using `Core::file::exists()` first.
Contrary to the old solution, this now requires the `rpath` pledge, so
pledge it to keep `strace` from crashing when using non-absolute paths.
This commit is contained in:
parent
548c23ded3
commit
4889eb019a
Notes:
sideshowbarker
2024-07-17 08:07:21 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/4889eb019a Pull-request: https://github.com/SerenityOS/serenity/pull/14926
1 changed files with 2 additions and 2 deletions
|
@ -808,7 +808,7 @@ static void format_syscall(FormattedSyscallBuilder& builder, Syscall::Function s
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio wpath cpath proc exec ptrace sigaction"));
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath proc exec ptrace sigaction"));
|
||||
|
||||
Vector<StringView> child_argv;
|
||||
|
||||
|
@ -843,7 +843,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
parse_syscalls(exclude_syscalls_option, exclude_syscalls);
|
||||
parse_syscalls(include_syscalls_option, include_syscalls);
|
||||
|
||||
TRY(Core::System::pledge("stdio proc exec ptrace sigaction"));
|
||||
TRY(Core::System::pledge("stdio rpath proc exec ptrace sigaction"));
|
||||
|
||||
int status;
|
||||
if (g_pid == -1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue