--- a/vendor/golang.org/x/sys/unix/syscall_linux.go Thu Sep 22 16:32:45 2022 +0200
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go Thu Sep 22 16:33:34 2022 +0200
@@ -13,6 +13,7 @@
import (
"encoding/binary"
+ "strconv"
"syscall"
"time"
"unsafe"
@@ -233,7 +234,7 @@
func Futimes(fd int, tv []Timeval) (err error) {
// Believe it or not, this is the best we can do on Linux
// (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
+ return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
}
const ImplementsGetwd = true
@@ -1891,17 +1892,28 @@
return int(ret), nil
}
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
+func Setuid(uid int) (err error) {
+ return syscall.Setuid(uid)
+}
-func Setuid(uid int) (err error) {
- return EOPNOTSUPP
+func Setgid(gid int) (err error) {
+ return syscall.Setgid(gid)
}
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
+func Setreuid(ruid, euid int) (err error) {
+ return syscall.Setreuid(ruid, euid)
+}
+
+func Setregid(rgid, egid int) (err error) {
+ return syscall.Setregid(rgid, egid)
+}
+
+func Setresuid(ruid, euid, suid int) (err error) {
+ return syscall.Setresuid(ruid, euid, suid)
+}
+
+func Setresgid(rgid, egid, sgid int) (err error) {
+ return syscall.Setresgid(rgid, egid, sgid)
}
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.