]> Cypherpunks repositories - gostls13.git/commit
syscall: don't call Setgroups if Credential.Groups is empty
authorAlexander Morozov <lk4d4math@gmail.com>
Thu, 27 Aug 2015 03:45:28 +0000 (20:45 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 27 Aug 2015 16:08:01 +0000 (16:08 +0000)
commit8261c887aaf997655b95591c17b1068bb627dc9d
tree84765a0389d3e7697fcb024af30fe043e700423d
parentb55c4a0c540f164687bcceeb50d07397b5e098be
syscall: don't call Setgroups if Credential.Groups is empty

Setgroups with zero-length groups is no-op for changing groups and
supposed to be used only for determining curent groups length. Also
because we deny setgroups by default if use GidMappings we have
unnecessary error from that no-op syscall.

Change-Id: I8f74fbca9190a3dcbbef1d886c518e01fa05eb62
Reviewed-on: https://go-review.googlesource.com/13938
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