]> Cypherpunks repositories - gostls13.git/commit
syscall: correctly set up uid/gid mappings in user namespaces
authorMichael Stapelberg <stapelberg@google.com>
Thu, 17 Jan 2019 15:53:41 +0000 (16:53 +0100)
committerIan Lance Taylor <iant@golang.org>
Tue, 12 Mar 2019 00:40:34 +0000 (00:40 +0000)
commit2bd28cee2356c34427a94f4323bd534641f7070b
tree8a830a0f4a85f88e7b62c71d956dee7905c5ccfc
parent30cc8a46c47252e15300d3cf9d27cba9e71e649b
syscall: correctly set up uid/gid mappings in user namespaces

Before this CL, uid/gid mapping was always set up from the parent
process, which is a privileged operation.

When using unprivileged user namespaces, a process can modify its
uid/gid mapping after the unshare(2) call (but setting the uid/gid
mapping from another process is NOT possible).

Fixes #29789

Change-Id: I8c96a03f5da23fe80bbb83ef051ad89cf185d750
Reviewed-on: https://go-review.googlesource.com/c/go/+/158298
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/syscall/exec_linux.go
src/syscall/exec_linux_test.go