aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.man.mk
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2025-07-26 06:11:58 +0000
committerKyle Evans <kevans@FreeBSD.org>2025-08-15 05:03:24 +0000
commitc96e754ea6884f5b8969861e6df66f4a33dad638 (patch)
treebdff6b5e006c6eadacd5579cb422cddddf10f2b4 /share/mk/bsd.man.mk
parent5c567849927f759c36be9b880a61d9f18e1705d6 (diff)
chroot: don't clobber the egid with the first supplemental groupstable/13
There are two problems here, really: 1.) If -G is specified, the egid of the runner will get clobbered by the first supplemental group 2.) If both -G and -g are specified, the first supplemental group will get clobbered by the -g group Ideally our users shouldn't have to understand the quirks of our setgroups(2) and the manpage doesn't describe the group list as needing to contain the egid, so populate the egid slot as necessary. I note that this code seems to have already been marginally aware of the historical behavior because it was allocating NGROUPS_MAX + 1, but this is an artifact of a later conversion to doing dynamic allocations instead of pushing NGROUPS_MAX arrays on the stack -- the original code did in-fact only have an NGROUPS_MAX-sized array, and the layout was still incorrect. Reviewed by: olce (cherry picked from commit 48fd05999b0f8e822fbf7069779378d103a35f5c) (cherry picked from commit babab49eee9472f628d774996de13d13d296c8c0)
Diffstat (limited to 'share/mk/bsd.man.mk')
0 files changed, 0 insertions, 0 deletions