webhook/droppriv_nope.go
christopher-conley f108a2b38e Allow Linux setuid/setgid
This commit allows webhook to setuid/setgid when running on Linux.

Tested with:

go get -d

CGO_ENABLED=0 go build -ldflags="-s -w"

Correctly compiled, ran, setuid/setgid properly, and answered hook requests.
2023-07-22 23:01:40 -04:00

12 lines
183 B
Go

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