Skip to content

Commit d2bc081

Browse files
committed
libcontainer: merge common syscall implementations
There are essentially two possible implementations for Setuid/Setgid on Linux, either using SYS_SETUID32/SYS_SETGID32 or SYS_SETUID/SYS_SETGID, depending on the architecture (see golang/go#1435 for why Setuid/Setgid aren currently implemented for Linux neither in syscall nor in golang.org/x/sys/unix). Reduce duplication by merging the currently implemented variants and adjusting the build tags accordingly. Signed-off-by: Tobias Klauser <[email protected]>
1 parent 6d30f7a commit d2bc081

File tree

4 files changed

+4
-52
lines changed

4 files changed

+4
-52
lines changed

libcontainer/system/syscall_linux_386.go renamed to libcontainer/system/syscall_linux_32.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// +build linux,386
1+
// +build linux
2+
// +build 386 arm
23

34
package system
45

libcontainer/system/syscall_linux_64.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x
1+
// +build linux
2+
// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le s390x
23

34
package system
45

libcontainer/system/syscall_linux_arm.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

libcontainer/system/syscall_linux_mipsx.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)