/
index
/
ust.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
2fca47a
)
add OpenBSD pledge support
author
git
<redacted>
Thu, 19 Mar 2026 21:45:39 +0000
(17:45 -0400)
committer
git
<redacted>
Thu, 19 Mar 2026 21:45:39 +0000
(17:45 -0400)
ust.c
patch
|
blob
|
history
diff --git
a/ust.c
b/ust.c
index 392bc439a08122db374a5c29bb61919516adfec9..8be0ce784d782fbf5dda33fd0fd3c190e4d6024b 100644
(file)
--- a/
ust.c
+++ b/
ust.c
@@
-143,6
+143,13
@@
openport(void)
int flags;
struct flock fl = { 0 };
+ #ifdef __OpenBSD__
+ if (pledge("stdio rpath wpath tty flock", NULL) == -1) {
+ perror("pledge");
+ die(1, "failed to set up pledge, exiting now\n");
+ }
+ #endif
+
if (verbose) fprintf(stderr, "opening \"%s\"\n", line);
fd = open(line, (O_RDWR | O_NOCTTY | O_NDELAY));