which: Use pledge()

This commit is contained in:
Andreas Kling 2020-02-18 10:58:56 +01:00
parent 7266cee590
commit 0b44f9d600

View file

@ -31,6 +31,11 @@
int main(int argc, char** argv)
{
if (pledge("stdio rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
if (argc < 2) {
printf("usage: which <executable>\n");
return 0;