From 0eec9c078a74ed262c10c7549dca0b92fdc5823f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 5 Dec 2017 22:52:50 -0800 Subject: [PATCH] Fix missing libcontainer syscall file I noticed this file showed up when revendoring dependencies with vndr. Also removed `github.com/Microsoft/opengcs` from vendor.conf as it was not used; 2017/12/05 22:41:58 WARNING: package github.com/Microsoft/opengcs is unused, consider removing it from vendor.conf Signed-off-by: Sebastiaan van Stijn --- vendor.conf | 1 - .../libcontainer/system/syscall_linux_32.go | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go diff --git a/vendor.conf b/vendor.conf index fea47e480..bc040dcbb 100644 --- a/vendor.conf +++ b/vendor.conf @@ -36,7 +36,6 @@ github.com/BurntSushi/toml v0.2.0-21-g9906417 github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0 github.com/Microsoft/go-winio v0.4.4 github.com/Microsoft/hcsshim v0.6.7 -github.com/Microsoft/opengcs v0.3.2 github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4 diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go b/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go new file mode 100644 index 000000000..c5ca5d862 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go @@ -0,0 +1,26 @@ +// +build linux +// +build 386 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 +}