mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
syscall: add Setuid for aix
Fixes [reserved]
This commit is contained in:
parent
1c924572d0
commit
7557a88cf5
|
@ -629,6 +629,7 @@ func PtraceDetach(pid int) (err error) { return ptrace64(PT_DETACH, int64(pid),
|
|||
//sysnb Setegid(egid int) (err error)
|
||||
//sysnb Seteuid(euid int) (err error)
|
||||
//sysnb Setgid(gid int) (err error)
|
||||
//sysnb Setuid(uid int) (err error)
|
||||
//sysnb Setpgid(pid int, pgid int) (err error)
|
||||
//sys Setpriority(which int, who int, prio int) (err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
|
|
|
@ -83,6 +83,7 @@ import "unsafe"
|
|||
//go:cgo_import_dynamic libc_Setegid setegid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Seteuid seteuid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Setgid setgid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Setuid setuid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Setpgid setpgid "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Setpriority setpriority "libc.a/shr_64.o"
|
||||
//go:cgo_import_dynamic libc_Setregid setregid "libc.a/shr_64.o"
|
||||
|
@ -177,6 +178,7 @@ import "unsafe"
|
|||
//go:linkname libc_Setegid libc_Setegid
|
||||
//go:linkname libc_Seteuid libc_Seteuid
|
||||
//go:linkname libc_Setgid libc_Setgid
|
||||
//go:linkname libc_Setuid libc_Setuid
|
||||
//go:linkname libc_Setpgid libc_Setpgid
|
||||
//go:linkname libc_Setpriority libc_Setpriority
|
||||
//go:linkname libc_Setregid libc_Setregid
|
||||
|
@ -274,6 +276,7 @@ var (
|
|||
libc_Setegid,
|
||||
libc_Seteuid,
|
||||
libc_Setgid,
|
||||
libc_Setuid,
|
||||
libc_Setpgid,
|
||||
libc_Setpriority,
|
||||
libc_Setregid,
|
||||
|
@ -1231,6 +1234,16 @@ func Setgid(gid int) (err error) {
|
|||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setuid(uid int) (err error) {
|
||||
_, _, e1 := rawSyscall6(uintptr(unsafe.Pointer(&libc_Setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setpgid(pid int, pgid int) (err error) {
|
||||
_, _, e1 := rawSyscall6(uintptr(unsafe.Pointer(&libc_Setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
|
||||
if e1 != 0 {
|
||||
|
|
Loading…
Reference in a new issue