mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +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
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)
|
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;
|
Vector<StringView> child_argv;
|
||||||
|
|
||||||
|
@ -843,7 +843,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
parse_syscalls(exclude_syscalls_option, exclude_syscalls);
|
parse_syscalls(exclude_syscalls_option, exclude_syscalls);
|
||||||
parse_syscalls(include_syscalls_option, include_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;
|
int status;
|
||||||
if (g_pid == -1) {
|
if (g_pid == -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue