mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-07 13:42:23 +02:00
18 lines
273 B
Go
18 lines
273 B
Go
|
//go:build !windows
|
||
|
|
||
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func getSysProcAttr(uid int, gid int) *syscall.SysProcAttr {
|
||
|
return &syscall.SysProcAttr{
|
||
|
Credential: &syscall.Credential{
|
||
|
Uid: uint32(uid),
|
||
|
Gid: uint32(gid),
|
||
|
NoSetGroups: true,
|
||
|
},
|
||
|
}
|
||
|
}
|