On Sat, May 15, 2021 at 05:55:19PM +0200, Luc Pardon wrote: > > Other than the extra dependency, I don't see any reason why not.
Please never use horrible dependencies for trivial functions. Especially ones that are not readibly available for all distributions, or are just plain bloaty (the real dependency is the massive FFI::Platypus package). Just copy code from SpamAssassin for example, it's worked for a decade everywhere: https://metacpan.org/release/Mail-SpamAssassin/source/lib/Mail/SpamAssassin/Util.pm Have a look at get_user_groups() and setuid_to_euid() which sets $) / $supgs.
