Debian Codegraph @

setuid/setuid-unix.go

raw symbols SCIP
1 // +build !windows,!plan9
2
3 package setuid
4
5 import "syscall"
6
7 // Setuid calls the *NIX setuid() function.
8 func Setuid(uid int) error {
9 return setuid(uid)
10 }
11
12 // Setgid calls the *NIX setgid() function.
13 func Setgid(gid int) error {
14 return setgid(gid)
15 }
16
17 // Setgroups calls the *NIX setgroups() function.
18 func Setgroups(gids []int) error {
19 return syscall.Setgroups(gids)
20 }
21
22 // Setresgid calls the *NIX setresgid() function.
23 func Setresgid(rgid, egid, sgid int) error {
24 return setresgid(rgid, egid, sgid)
25 }
26
27 // Setresuid calls the *NIX setresuid() function.
28 func Setresuid(ruid, euid, suid int) error {
29 return setresuid(ruid, euid, suid)
30 }