aboutsummaryrefslogtreecommitdiffstats
path: root/src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go')
-rw-r--r--src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go b/src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go
new file mode 100644
index 0000000..c990065
--- /dev/null
+++ b/src/kube2msb/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go
@@ -0,0 +1,25 @@
+// +build linux,386
+
+package system
+
+import (
+ "syscall"
+)
+
+// Setuid sets the uid of the calling thread to the specified uid.
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, 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 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}