v1.16.1
FIXED: * Some IDState things on *NIX-likes that have no clue what they're doing
This commit is contained in:
31
funcs_nix_noresuid.go
Normal file
31
funcs_nix_noresuid.go
Normal file
@@ -0,0 +1,31 @@
|
||||
//go:build !(windows || plan9 || wasip1 || js || ios) && (aix || darwin || dragonfly || freebsd || illumos || netbsd || solaris)
|
||||
|
||||
package sysutils
|
||||
|
||||
import (
|
||||
`golang.org/x/sys/unix`
|
||||
)
|
||||
|
||||
// getresgid spoofs unix.Getresgid, as this file targets platforms that do not support it.
|
||||
func getresgid() (rgid, egid, sgid int) {
|
||||
|
||||
// rgid, egid, sgid = unix.Getresgid()
|
||||
|
||||
rgid = unix.Getgid()
|
||||
egid = unix.Getegid()
|
||||
sgid = -1
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// getresuid spoofs unix.Getresuid, as this file targets platforms that do not support it.
|
||||
func getresuid() (ruid, euid, suid int) {
|
||||
|
||||
// ruid, euid, suid = unix.Getresuid()
|
||||
|
||||
ruid = unix.Getuid()
|
||||
euid = unix.Geteuid()
|
||||
suid = -1
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user