diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2025-08-09 16:01:57 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2025-08-09 16:01:57 +0000 |
commit | 239e8c98636a7578cc67a6f9d54d14c71b095e36 (patch) | |
tree | bf57f922add245b0d7b4959a4da29f70d8c39527 /contrib/groff/troff/(public-mirror) | |
parent | 5f72125339b1d14d1b04329ac561354f5e8133fe (diff) |
Current and traditional FreeBSD behavior means that getegid() here is
the first element in the prior setgroups() call, if any, so we may
inadvertently wipe out our rgid with the unprivileged gid. This is
rendered somewhat harmless by the fact that we're losing the privileged
gid -- we'll still regain it as the egid in restore_uid() later by way
of restoring saved_egroups, rather than by intentionally restoring it
from getgid().
This will be promptly reverted if we can get setgroups(2)/getgroups(2)
changed in FreeBSD 15.0, but it seemed wise to get this technically
correct for previous branches.
Reviewed by: jlduran
Differential Revision: https://reviews.freebsd.org/D51753
Diffstat (limited to 'contrib/groff/troff/(public-mirror)')
0 files changed, 0 insertions, 0 deletions