touch: Use pledge()
This commit is contained in:
parent
b58728ed99
commit
feb4c683eb
Notes:
sideshowbarker
2024-07-19 09:13:57 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/feb4c683eb2
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue