mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: add Getresuid, Getresgid for linux
Fixes golang/go#60483 Change-Id: Id4c1bf8367066485a16bedeea337c384a3555942 GitHub-Last-Rev: 61f0fe6f6a5be1cd34ddf99e72a75cfd32355793 GitHub-Pull-Request: golang/sys#159 Reviewed-on: https://go-review.googlesource.com/c/sys/+/499055 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
b5c7a0975d
commit
b52f5441ce
@@ -2420,6 +2420,21 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
|
||||
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
|
||||
}
|
||||
|
||||
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
|
||||
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
|
||||
|
||||
func Getresuid() (ruid, euid, suid int) {
|
||||
var r, e, s _C_int
|
||||
getresuid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
func Getresgid() (rgid, egid, sgid int) {
|
||||
var r, e, s _C_int
|
||||
getresgid(&r, &e, &s)
|
||||
return int(r), int(e), int(s)
|
||||
}
|
||||
|
||||
/*
|
||||
* Unimplemented
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user