mirror of
https://github.com/openbsd/ports.git
synced 2026-06-19 07:54:00 +02:00
23 lines
494 B
Plaintext
23 lines
494 B
Plaintext
Index: src/f3write.c
|
|
--- src/f3write.c.orig
|
|
+++ src/f3write.c
|
|
@@ -1,3 +1,5 @@
|
|
+#include <unistd.h>
|
|
+
|
|
#define _POSIX_C_SOURCE 200112L
|
|
#define _XOPEN_SOURCE 600
|
|
|
|
@@ -397,6 +399,12 @@ int main(int argc, char **argv)
|
|
print_header(stdout, "write");
|
|
|
|
adjust_dev_path(&args.dev_path);
|
|
+
|
|
+ if (unveil(args.dev_path, "rwc") == -1)
|
|
+ err(1, "unveil");
|
|
+
|
|
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
|
|
+ err(1, "pledge");
|
|
|
|
unlink_old_files(args.dev_path, args.start_at, args.end_at);
|
|
|