diff options
| author | Aaron Bieber <aaron@bolddaemon.com> | 2020-01-18 22:13:32 -0700 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-01-19 14:13:32 +0900 |
| commit | a1bcdc225e1c9b890214fcea3d19d85226fc552a (patch) | |
| tree | 7d7a24e070e85ed0212285d1df0d56d39388ddd2 /src/protector/protector_openbsd.go | |
| parent | 7771241cc0c91f8b53cb472671a82e57755d08c8 (diff) | |
| download | fzf-a1bcdc225e1c9b890214fcea3d19d85226fc552a.tar.gz | |
Add pledge(2) support (OpenBSD only) via a 'protector' package. (#1297)
Diffstat (limited to 'src/protector/protector_openbsd.go')
| -rw-r--r-- | src/protector/protector_openbsd.go | 10 |
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") +} |
