pledge() on OpenBSD
This commit is contained in:
parent
4dc756be4d
commit
1f54214821
|
@ -25,6 +25,8 @@ type App struct {
|
|||
func main() {
|
||||
dlog.Init("dnscrypt-proxy", dlog.SeverityNotice, "DAEMON")
|
||||
|
||||
Pledge()
|
||||
|
||||
pwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
dlog.Fatal("Unable to find the path to the current directory")
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// +build openbsd
|
||||
|
||||
package main
|
||||
|
||||
import "unix"
|
||||
|
||||
func Pledge() {
|
||||
unix.Pledge("stdio rpath wpath cpath tmppath inet fattr flock dns getpw sendfd recvfd proc exec id",
|
||||
"stdio rpath wpath cpath tmppath inet fattr flock dns recvfd")
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
// +build !openbsd
|
||||
|
||||
package main
|
||||
|
||||
func Pledge() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue