1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:28:11 +00:00

chmod: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-12 13:25:02 +01:00
parent 22cf24cba7
commit a27d2b7b32

View file

@ -48,6 +48,11 @@ Optional<Mask> apply_permission(char access_scope, char permission, char operati
int main(int argc, char** argv)
{
if (pledge("stdio rpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
if (argc < 3) {
printf("usage: chmod <octal-mode> <path,...>\n"
" chmod [[ugoa][+-=][rwx...],...] <path,...>\n");