mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
move setuid/setgid into separate functions in platform-dependent files
This commit is contained in:
parent
70b9274ddc
commit
b299d7e36b
3 changed files with 36 additions and 4 deletions
13
cmd/yggdrasil/setids_posix.go
Normal file
13
cmd/yggdrasil/setids_posix.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
// +build linux darwin freebsd openbsd
|
||||
|
||||
package main
|
||||
|
||||
import "syscall"
|
||||
|
||||
func setuid(uid int) error {
|
||||
return syscall.Setuid(uid)
|
||||
}
|
||||
|
||||
func setgid(gid int) error {
|
||||
return syscall.Setgid(gid)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue