Commit 22ddcd1a13082b7be0fc99b720677efd2b733816 made libstd drops ancillary groups when uid == 0: https://github.com/rust-lang/rust/blob/385f8e2078b00282a7a7ffcd58aad17b405f57bf/library/std/src/sys/unix/process/process_unix.rs#L312-L314 Before that it unconditionally dropped group membership. The new logic is wrong on Linux: it doesn't account for processes whose uid != 0 but have the CAP_SETGID capability. Such processes can and should drop ancillary groups, otherwise child processes inherit permissions they otherwise wouldn't have. Suggested change: ```rust if self.get_groups().is_none() { let _ = libc::setgroups(0, ptr::null()); // or return unless EPERM } ```