From 987ced003ec2971797e8969e0cf0a37a751ebc84 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 26 Feb 2025 21:21:57 +0100 Subject: syscallcompat: rename thread_credentials files to include "linux" As with the other files, include "linux" because the code only builds on linux renamed: internal/syscallcompat/thread_credentials.go -> internal/syscallcompat/thread_credentials_linux.go renamed: internal/syscallcompat/thread_credentials_368_arm.go -> internal/syscallcompat/thread_credentials_linux_368_arm.go renamed: internal/syscallcompat/thread_credentials_other.go -> internal/syscallcompat/thread_credentials_linux_other.go --- .../syscallcompat/thread_credentials_368_arm.go | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 internal/syscallcompat/thread_credentials_368_arm.go (limited to 'internal/syscallcompat/thread_credentials_368_arm.go') diff --git a/internal/syscallcompat/thread_credentials_368_arm.go b/internal/syscallcompat/thread_credentials_368_arm.go deleted file mode 100644 index 1244160..0000000 --- a/internal/syscallcompat/thread_credentials_368_arm.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build (linux && 386) || (linux && arm) - -package syscallcompat - -import ( - "unsafe" - - "golang.org/x/sys/unix" -) - -// See thread_credentials.go for docs - -func Setreuid(ruid int, euid int) (err error) { - _, _, e1 := unix.RawSyscall(unix.SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) - if e1 != 0 { - err = e1 - } - return -} - -func Setregid(rgid int, egid int) (err error) { - _, _, e1 := unix.RawSyscall(unix.SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) - if e1 != 0 { - err = e1 - } - return -} - -func setgroups(n int, list *uint32) (err error) { - _, _, e1 := unix.RawSyscall(unix.SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) - if e1 != 0 { - err = e1 - } - return -} -- cgit v1.2.3