diff options
-rw-r--r-- | block.go | 2 | ||||
-rw-r--r-- | block_other.go | 9 | ||||
-rw-r--r-- | commands.go | 2 | ||||
-rw-r--r-- | commands_other.go | 9 | ||||
-rw-r--r-- | path.go | 2 | ||||
-rw-r--r-- | path_other.go | 15 | ||||
-rw-r--r-- | paths.go | 2 | ||||
-rw-r--r-- | paths_other.go | 15 |
8 files changed, 56 insertions, 0 deletions
diff --git a/block.go b/block.go index c16a1eb..5a46693 100644 --- a/block.go +++ b/block.go @@ -1,3 +1,5 @@ +// +build openbsd + package lynx import "golang.org/x/sys/unix" diff --git a/block_other.go b/block_other.go new file mode 100644 index 0000000..65b7131 --- /dev/null +++ b/block_other.go @@ -0,0 +1,9 @@ +// +build !openbsd + +package lynx + +// UnveilBlock is just a wrapper around unix.UnveilBlock, it does +// nothing on non OpenBSD systems. +func UnveilBlock() error { + return nil +} diff --git a/commands.go b/commands.go index 5d57546..0d645ff 100644 --- a/commands.go +++ b/commands.go @@ -1,3 +1,5 @@ +// +build openbsd + package lynx import ( diff --git a/commands_other.go b/commands_other.go new file mode 100644 index 0000000..794d18b --- /dev/null +++ b/commands_other.go @@ -0,0 +1,9 @@ +// +build !openbsd + +package lynx + +// UnveilCommands takes a slice of commands & unveils them one by one, +// it does nothing on non OpenBSD systems. +func UnveilCommands(_ []string) error { + return nil +} diff --git a/path.go b/path.go index 8f3dcc2..a04c723 100644 --- a/path.go +++ b/path.go @@ -1,3 +1,5 @@ +// +build openbsd + package lynx import "golang.org/x/sys/unix" diff --git a/path_other.go b/path_other.go new file mode 100644 index 0000000..a0273c9 --- /dev/null +++ b/path_other.go @@ -0,0 +1,15 @@ +// +build !openbsd + +package lynx + +// UnveilPath takes a path, permission & unveils it, it does nothing +// on non OpenBSD systems. +func UnveilPath(_ string, _ string) error { + return nil +} + +// UnveilPathStrict is just a wrapper around unix.Unveil. It does +// nothing on non OpenBSD systems. +func UnveilPathStrict(_ string, _ string) error { + return nil +} diff --git a/paths.go b/paths.go index 2a3986e..589cca5 100644 --- a/paths.go +++ b/paths.go @@ -1,3 +1,5 @@ +// +build openbsd + // Package lynx is a simple wrapper to unveil. package lynx diff --git a/paths_other.go b/paths_other.go new file mode 100644 index 0000000..de2c2b1 --- /dev/null +++ b/paths_other.go @@ -0,0 +1,15 @@ +// +build !openbsd + +package lynx + +// UnveilPaths takes a map of path, permission & unveils them one by +// one, it does nothing on non OpenBSD systems. +func UnveilPaths(_ map[string]string) error { + return nil +} + +// UnveilPathsStrict takes a map of path, permission & unveils them +// one by one, it does nothing on non OpenBSD systems. +func UnveilPathsStrict(_ map[string]string) error { + return nil +} |