summary refs log tree commit diff stats
path: root/path_other.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-04-15 00:24:55 +0530
committerAndinus <andinus@nand.sh>2020-04-15 00:24:55 +0530
commita129334aefa559e36783347c5243303a6dd8b104 (patch)
treedfd3964ccf879037b14a7a917641963b45e123b9 /path_other.go
parent0dfcf8cb81daa80aa751a5a40c243e64ee030929 (diff)
downloadlynx-a129334aefa559e36783347c5243303a6dd8b104.tar.gz
Compile for non OpenBSD systems
Previously the compilation would fail for non OpenBSD systems & the
user had to manage it themselves. Now it compiles on non OpenBSD
systems but returns nil immediately because unveil isn't supported on
those systems.
Diffstat (limited to 'path_other.go')
-rw-r--r--path_other.go15
1 files changed, 15 insertions, 0 deletions
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
+}