touch: Use pledge()

This commit is contained in:
Andreas Kling 2020-02-18 13:25:34 +01:00
parent b58728ed99
commit feb4c683eb
Notes: sideshowbarker 2024-07-19 09:13:57 +09:00

View file

@ -50,6 +50,11 @@ static bool file_exists(const char* path)
int main(int argc, char** argv)
{
if (pledge("stdio rpath cpath fattr", nullptr)) {
perror("pledge");
return 1;
}
if (argc != 2) {
fprintf(stderr, "usage: touch <path>\n");
return 1;