Skip to content

Commit b52f544

Browse files
mateusz834gopherbot
authored andcommitted
unix: add Getresuid, Getresgid for linux
Fixes golang/go#60483 Change-Id: Id4c1bf8367066485a16bedeea337c384a3555942 GitHub-Last-Rev: 61f0fe6 GitHub-Pull-Request: #159 Reviewed-on: https://go-review.googlesource.com/c/sys/+/499055 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent b5c7a09 commit b52f544

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

unix/syscall_linux.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,21 @@ func PthreadSigmask(how int, set, oldset *Sigset_t) error {
24202420
return rtSigprocmask(how, set, oldset, _C__NSIG/8)
24212421
}
24222422

2423+
//sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int)
2424+
//sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int)
2425+
2426+
func Getresuid() (ruid, euid, suid int) {
2427+
var r, e, s _C_int
2428+
getresuid(&r, &e, &s)
2429+
return int(r), int(e), int(s)
2430+
}
2431+
2432+
func Getresgid() (rgid, egid, sgid int) {
2433+
var r, e, s _C_int
2434+
getresgid(&r, &e, &s)
2435+
return int(r), int(e), int(s)
2436+
}
2437+
24232438
/*
24242439
* Unimplemented
24252440
*/

unix/zsyscall_linux.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)