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:
parent
6d992ca214
commit
8e32908ada
2
main.go
2
main.go
|
@ -24,7 +24,7 @@ func main() {
|
|||
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})
|
||||
if isVerbose {
|
||||
|
|
|
@ -6,5 +6,5 @@ import "golang.org/x/sys/unix"
|
|||
|
||||
// Pledge allowed system calls
|
||||
func Pledge(promises string) {
|
||||
unix.Pledge(promises, "")
|
||||
unix.PledgePromises(promises)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue