diff --git a/Userland/id.cpp b/Userland/id.cpp index e37ed60e58..6403bf3382 100644 --- a/Userland/id.cpp +++ b/Userland/id.cpp @@ -40,6 +40,21 @@ static bool flag_print_gid_all = false; int main(int argc, char** argv) { + if (unveil("/etc/passwd", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil("/etc/group", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil(nullptr, nullptr) < 0) { + perror("unveil"); + return 1; + } + if (pledge("stdio rpath", nullptr) < 0) { perror("pledge"); return 1;