cp: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-13 12:30:07 +01:00
commit 8ccc2b25c2
Notes: sideshowbarker 2024-07-19 10:04:34 +09:00

View file

@ -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");