mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-28 15:29:09 +01:00
[client] Drop SSH privileges through libc in PKCS#11 package builds (#8323)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//go:build unix && !(pkcs11 && linux && !android && (amd64 || arm64))
|
||||
|
||||
package server
|
||||
|
||||
import "syscall"
|
||||
|
||||
func setgroups(gids []int) error {
|
||||
return syscall.Setgroups(gids)
|
||||
}
|
||||
|
||||
func setgid(gid int) error {
|
||||
return syscall.Setgid(gid)
|
||||
}
|
||||
|
||||
func setuid(uid int) error {
|
||||
return syscall.Setuid(uid)
|
||||
}
|
||||
|
||||
func setegid(egid int) error {
|
||||
return syscall.Setegid(egid)
|
||||
}
|
||||
|
||||
func seteuid(euid int) error {
|
||||
return syscall.Seteuid(euid)
|
||||
}
|
||||
Reference in New Issue
Block a user