diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/top.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Userland/top.cpp b/Userland/top.cpp index 37175cf3d3..beef373a97 100644 --- a/Userland/top.cpp +++ b/Userland/top.cpp @@ -133,6 +133,23 @@ static Snapshot get_snapshot() int main(int, char**) { + if (pledge("stdio rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + + if (unveil("/proc/all", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/etc/passwd", "r") < 0) { + perror("unveil"); + return 1; + } + + unveil(nullptr, nullptr); + Vector<ThreadData*> threads; auto prev = get_snapshot(); usleep(10000); |