about summary refs log tree commit diff
path: root/tests/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-14 20:00:17 +0100
committerGitHub <noreply@github.com>2024-03-14 20:00:17 +0100
commiteaa8dafe1aa80427943708657f4b5a926c4b4e1f (patch)
tree41b76e999cd9aa586edcb6e1c31de170fb7b0404 /tests/debuginfo/enum-thinlto.rs
parent68ca795286f8c7c4a61c59f88330e916f0a11f7e (diff)
parent3a6af84fca1b41614887748e9fdb0e2b2a13fb96 (diff)
downloadrust-eaa8dafe1aa80427943708657f4b5a926c4b4e1f.tar.gz
rust-eaa8dafe1aa80427943708657f4b5a926c4b4e1f.zip
Rollup merge of #121650 - GrigorenkoPV:cap_setgid, r=Amanieu
change std::process to drop supplementary groups based on CAP_SETGID

A trivial rebase of #95982

Should fix #39186 (from what I can tell)

Original description:

> Fixes #88716
>
> * Before this change, when a process was given a uid via `std::os::unix::process::CommandExt.uid`, there would be a `setgroups` call (when the process runs) to clear supplementary groups for the child **if the parent was root** (to remove potentially unwanted permissions).
> * After this change, supplementary groups are cleared if we have permission to do so, that is, if we have the CAP_SETGID capability.
>
> This new behavior was agreed upon in #88716 but there was a bit of uncertainty from `@Amanieu` here: [#88716 (comment)](https://github.com/rust-lang/rust/issues/88716#issuecomment-973366600)
>
> > I agree with this change, but is it really necessary to ignore an EPERM from setgroups? If you have permissions to change UID then you should also have permissions to change groups. I would feel more comfortable if we documented set_uid as requiring both UID and GID changing permissions.
>
> The way I've currently written it, we ignore an EPERM as that's what #88716 originally suggested. I'm not at all an expert in any of this so I'd appreciate feedback on whether that was the right way to go.
Diffstat (limited to 'tests/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions