mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
unix: fix Setfsuid and Setfsgid return values
setfsuid(2) and setfsgid(2) both return an int value that indicates the previous fsuid or fsgid set. This change makes unix.Setfsgid() and unix.Setfsuid() return these values too instead of returning only an error. Fixes golang/go#36649 Change-Id: I56cbb49d7485023b6b04f7b95e8f675473241d8c Reviewed-on: https://go-review.googlesource.com/c/sys/+/215240 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
59e60aa80a
commit
94506bca4f
@@ -70,8 +70,8 @@ func Pipe2(p []int, flags int) (err error) {
|
||||
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
//sys Setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
|
||||
@@ -55,8 +55,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -98,8 +98,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
|
||||
//sys Setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
|
||||
//sys Setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
|
||||
//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
|
||||
|
||||
@@ -42,8 +42,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -36,8 +36,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -31,8 +31,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
|
||||
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -34,8 +34,8 @@ package unix
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -41,8 +41,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
}
|
||||
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -34,8 +34,8 @@ import (
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -30,8 +30,8 @@ package unix
|
||||
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
||||
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
|
||||
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
||||
//sys Setfsgid(gid int) (err error)
|
||||
//sys Setfsuid(uid int) (err error)
|
||||
//sys Setfsgid(gid int) (prev int, err error)
|
||||
//sys Setfsuid(uid int) (prev int, err error)
|
||||
//sysnb Setregid(rgid int, egid int) (err error)
|
||||
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
|
||||
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
|
||||
|
||||
@@ -2121,8 +2121,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2131,8 +2132,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2137,8 +2137,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2147,8 +2148,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2257,8 +2257,9 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2267,8 +2268,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2060,8 +2060,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2070,8 +2071,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2051,8 +2051,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2061,8 +2062,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2081,8 +2081,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2091,8 +2092,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2081,8 +2081,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2091,8 +2092,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2051,8 +2051,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2061,8 +2062,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2163,8 +2163,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2173,8 +2174,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2163,8 +2163,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2173,8 +2174,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2040,8 +2040,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2050,8 +2051,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2133,8 +2133,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2143,8 +2144,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
@@ -2132,8 +2132,9 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsgid(gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
func Setfsgid(gid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
@@ -2142,8 +2143,9 @@ func Setfsgid(gid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setfsuid(uid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
func Setfsuid(uid int) (prev int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
|
||||
prev = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user