Add setuid & setgid options

Only applicable on unix systems, although Go doesn't support Linux at
this time.
This commit is contained in:
Cameron Moore 2019-12-25 23:23:35 -06:00
parent 35d1cedc24
commit 77159d9db6
4 changed files with 58 additions and 4 deletions

12
droppriv_nope.go Normal file
View file

@ -0,0 +1,12 @@
// +build linux windows
package main
import (
"errors"
"runtime"
)
func dropPrivileges(uid, gid int) error {
return errors.New("setuid and setgid not supported on " + runtime.GOOS)
}