mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-17 02:50:09 +00:00
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.
12 lines
183 B
Go
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)
|
|
}
|