mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-20 03:09:12 +01:00
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")
|
||||
|
10
dnscrypt-proxy/pledge_openbsd.go
Normal file
10
dnscrypt-proxy/pledge_openbsd.go
Normal file
@ -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")
|
||||
}
|
7
dnscrypt-proxy/pledge_others.go
Normal file
7
dnscrypt-proxy/pledge_others.go
Normal file
@ -0,0 +1,7 @@
|
||||
// +build !openbsd
|
||||
|
||||
package main
|
||||
|
||||
func Pledge() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user