diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-11 22:36:09 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-11 22:36:09 +0100 |
commit | e5234f9560d55d681b61b7b0ab4c3de8c9e8d93a (patch) | |
tree | a63058bd8b2e0bc7680dffe6f29cef7e0d1d6c1c /Userland | |
parent | f03800cee39c5cbe06c2b68aeb9c9cd558231c3b (diff) | |
download | serenity-e5234f9560d55d681b61b7b0ab4c3de8c9e8d93a.zip |
strace: Use pledge()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/strace.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/strace.cpp b/Userland/strace.cpp index 3e7f809787..e915e7d3f2 100644 --- a/Userland/strace.cpp +++ b/Userland/strace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,6 +53,11 @@ static void handle_sigint(int) int main(int argc, char** argv) { + if (pledge("stdio proc exec ptrace sigaction", nullptr) < 0) { + perror("pledge"); + return 1; + } + Vector<const char*> child_argv; const char* output_filename = nullptr; |