mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
cp: Use pledge()
This commit is contained in:
parent
56428e764e
commit
8ccc2b25c2
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ bool copy_directory(String, String);
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio rpath wpath cpath fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
CArgsParser args_parser("cp");
|
||||
args_parser.add_arg("r", "copy directories recursively");
|
||||
args_parser.add_required_single_value("source");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue