]> Cypherpunks repositories - gostls13.git/commit
syscall: call setgroups for no groups on GNU/Linux
authorAlexander Morozov <lk4d4math@gmail.com>
Fri, 27 May 2016 22:02:31 +0000 (15:02 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 2 Jun 2016 17:21:34 +0000 (17:21 +0000)
commit853cd1f4a61396cccb91522ed59af52d61aa8371
tree6861440f3eab595ddb66791c84670873b4801d80
parente90a49a0f5380c6f68502b1febfb73f696c2f610
syscall: call setgroups for no groups on GNU/Linux

Skip setgroups only for one particular case: GidMappings != nil and
GidMappingsEnableSetgroup == false and list of supplementary groups is
empty.
This patch returns pre-1.5 behavior for simple exec and still allows to
use GidMappings with non-empty Credential.

Change-Id: Ia91c77e76ec5efab7a7f78134ffb529910108fc1
Reviewed-on: https://go-review.googlesource.com/23524
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/exec_linux.go
src/syscall/exec_linux_test.go