Bump runc to d5b4a3e

This fixes a race condition in runc/systemd at container creation time
opencontainers/runc#1683

Signed-off-by: vikaschoudhary16 <vichoudh@redhat.com>
This commit is contained in:
vikaschoudhary16
2018-01-10 19:20:21 -05:00
committed by vikaschoudhary16
parent 81192eafd5
commit 4711bccd05
101 changed files with 3694 additions and 1709 deletions

View File

@@ -18,7 +18,6 @@ go_library(
"unsupported.go",
],
"@io_bazel_rules_go//go/platform:freebsd": [
"sysconfig.go",
"sysconfig_notcgo.go",
"unsupported.go",
],
@@ -55,17 +54,29 @@ go_library(
"//conditions:default": [],
}) + select({
"@io_bazel_rules_go//go/platform:linux_386": [
"syscall_linux_386.go",
"syscall_linux_32.go",
],
"@io_bazel_rules_go//go/platform:linux_amd64": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_arm": [
"syscall_linux_arm.go",
"syscall_linux_32.go",
],
"@io_bazel_rules_go//go/platform:linux_arm64": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_mips": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_mips64": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_mips64le": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_mipsle": [
"syscall_linux_64.go",
],
"@io_bazel_rules_go//go/platform:linux_ppc64": [
"syscall_linux_64.go",
],

View File

@@ -134,3 +134,14 @@ func RunningInUserNS() bool {
func SetSubreaper(i int) error {
return unix.Prctl(PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0)
}
// GetSubreaper returns the subreaper setting for the calling process
func GetSubreaper() (int, error) {
var i uintptr
if err := unix.Prctl(unix.PR_GET_CHILD_SUBREAPER, uintptr(unsafe.Pointer(&i)), 0, 0, 0); err != nil {
return -1, err
}
return int(i), nil
}

View File

@@ -1,4 +1,5 @@
// +build linux,386
// +build linux
// +build 386 arm
package system

View File

@@ -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

View File

@@ -1,25 +0,0 @@
// +build linux,arm
package system
import (
"golang.org/x/sys/unix"
)
// Setuid sets the uid of the calling thread to the specified uid.
func Setuid(uid int) (err error) {
_, _, e1 := unix.RawSyscall(unix.SYS_SETUID32, uintptr(uid), 0, 0)
if e1 != 0 {
err = e1
}
return
}
// Setgid sets the gid of the calling thread to the specified gid.
func Setgid(gid int) (err error) {
_, _, e1 := unix.RawSyscall(unix.SYS_SETGID32, uintptr(gid), 0, 0)
if e1 != 0 {
err = e1
}
return
}

View File

@@ -1,4 +1,4 @@
// +build cgo,linux cgo,freebsd
// +build cgo,linux
package system