feature request: std::os::unix::process::CommandExt.groups() #38527
Labels
C-feature-accepted
Category: A feature request that has been accepted pending implementation.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
std::os::unix::process::CommandExt
already offers.uid()
and.gid()
methods to control the user identity of the child process (callingsetuid
andsetgid
respectively).For complete control of Unix credentials, there should also be a way to call
setgroups
in the child. (setgroups
is not in POSIX, butgetgroups
and the concept of the supplementary group list are; I would expect this not to be a portability concern.)This feature would eliminate a use of
before_exec
and an unsafe block (to calllibc::setgroups
) from the program I'm currently writing, which is a port to Rust of a setuid C program. For illustration, this function exists in the C version:This issue has been assigned to @slo1 via this comment.
The text was updated successfully, but these errors were encountered: