Skip to content

Commit

Permalink
libcontainer: merge common syscall implementations
Browse files Browse the repository at this point in the history
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 <tklauser@distanz.ch>
  • Loading branch information
tklauser committed Oct 16, 2017
1 parent 6d30f7a commit d2bc081
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build linux,386
// +build linux
// +build 386 arm

package system

Expand Down
3 changes: 2 additions & 1 deletion libcontainer/system/syscall_linux_64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x
// +build linux
// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le s390x

package system

Expand Down
25 changes: 0 additions & 25 deletions libcontainer/system/syscall_linux_arm.go

This file was deleted.

25 changes: 0 additions & 25 deletions libcontainer/system/syscall_linux_mipsx.go

This file was deleted.

0 comments on commit d2bc081

Please sign in to comment.