summaryrefslogtreecommitdiff
path: root/src/protector/protector_openbsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/protector/protector_openbsd.go')
-rw-r--r--src/protector/protector_openbsd.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/protector/protector_openbsd.go b/src/protector/protector_openbsd.go
new file mode 100644
index 00000000..84a5ded1
--- /dev/null
+++ b/src/protector/protector_openbsd.go
@@ -0,0 +1,10 @@
+// +build openbsd
+
+package protector
+
+import "golang.org/x/sys/unix"
+
+// Protect calls OS specific protections like pledge on OpenBSD
+func Protect() {
+ unix.PledgePromises("stdio rpath tty proc exec")
+}