mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
chmod: Use pledge()
This commit is contained in:
parent
22cf24cba7
commit
a27d2b7b32
1 changed files with 5 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue