mknod: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-27 21:38:36 +01:00
parent 8b49804895
commit 8f6dc3e9a0
Notes: sideshowbarker 2024-07-19 09:46:22 +09:00

View file

@ -42,6 +42,11 @@ static int usage()
int main(int argc, char** argv)
{
if (pledge("stdio dpath", nullptr) < 0) {
perror("pledge");
return 1;
}
// FIXME: When invoked with type "p", no need for major/minor numbers.
// FIXME: Add some kind of option for specifying the file permissions.
if (argc != 5)