id: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 20:49:25 +01:00
parent 409a4f7756
commit d30d3fac6f

View file

@ -14,6 +14,10 @@ static bool flag_print_gid_all = false;
int main(int argc, char** argv)
{
if (pledge("stdio rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
static const char* valid_option_characters = "ugGn";
int opt;
while ((opt = getopt(argc, argv, valid_option_characters)) != -1) {