mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-24 17:10:52 +08:00
16 lines
482 B
Go
16 lines
482 B
Go
//go:build unix && !linux
|
|
|
|
package server
|
|
|
|
import "errors"
|
|
|
|
// PR_SET_NO_NEW_PRIVS is Linux only. The privilege drop is never enabled elsewhere
|
|
// (execPrivilegeSupported is false), so this only keeps the unix code compiling and
|
|
// fails closed if reached.
|
|
|
|
var errNoNewPrivsUnsupported = errors.New("no_new_privs: PR_SET_NO_NEW_PRIVS is not supported on this platform")
|
|
|
|
func setNoNewPrivileges() error { return errNoNewPrivsUnsupported }
|
|
|
|
var setNoNewPrivsFn = setNoNewPrivileges
|