Fix OpenBSD pledges (#111)
- Change call from 'unix.Pledge' to 'unix.PledgePromises' to prevent subprocesses (gpg) from being already locked (execpromises="") - New pledges needed for syslog: unix + tty
This commit is contained in:
2
main.go
2
main.go
@@ -24,7 +24,7 @@ func main() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
openbsd.Pledge("stdio rpath proc exec getpw")
|
openbsd.Pledge("stdio rpath proc exec getpw unix tty")
|
||||||
|
|
||||||
log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
|
log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
|
||||||
if isVerbose {
|
if isVerbose {
|
||||||
|
@@ -6,5 +6,5 @@ import "golang.org/x/sys/unix"
|
|||||||
|
|
||||||
// Pledge allowed system calls
|
// Pledge allowed system calls
|
||||||
func Pledge(promises string) {
|
func Pledge(promises string) {
|
||||||
unix.Pledge(promises, "")
|
unix.PledgePromises(promises)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user