summary refs log tree commit diff stats
path: root/cmd/cetus/main_openbsd.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-04-24 19:46:49 +0530
committerAndinus <andinus@nand.sh>2020-04-24 19:46:49 +0530
commita01ce7b96892849d91911a2ef143a08b8e4e57c5 (patch)
tree2a5b7148c34051bfb674c52a40e6e924ab43c6dd /cmd/cetus/main_openbsd.go
parent14916180447e88eafe09c6a7e8289baacd2194ad (diff)
downloadcetus-a01ce7b96892849d91911a2ef143a08b8e4e57c5.tar.gz
Upgrade to lynx v0.4.0
Diffstat (limited to 'cmd/cetus/main_openbsd.go')
-rw-r--r--cmd/cetus/main_openbsd.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/cmd/cetus/main_openbsd.go b/cmd/cetus/main_openbsd.go
deleted file mode 100644
index 7e19f5b..0000000
--- a/cmd/cetus/main_openbsd.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// +build openbsd
-
-package main
-
-import (
-	"log"
-
-	"golang.org/x/sys/unix"
-	"tildegit.org/andinus/cetus/cache"
-	"tildegit.org/andinus/lynx"
-)
-
-func main() {
-	unveil()
-	app()
-}
-
-func unveil() {
-	paths := make(map[string]string)
-
-	paths[cache.Dir()] = "rwc"
-	paths["/dev/null"] = "rw" // required by feh
-	paths["/etc/resolv.conf"] = "r"
-
-	// ktrace output
-	paths["/usr/libexec/ld.so"] = "r"
-	paths["/var/run/ld.so.hints"] = "r"
-	paths["/usr/lib"] = "r"
-	paths["/dev/urandom"] = "r"
-	paths["/etc/hosts"] = "r"
-	paths["/etc/ssl"] = "r"
-
-	err := lynx.UnveilPaths(paths)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	commands := []string{"feh", "gsettings", "pcmanfm", "notify-send"}
-
-	err = lynx.UnveilCommands(commands)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Block further unveil calls
-	err = unix.UnveilBlock()
-	if err != nil {
-		log.Fatal(err)
-	}
-}