On Monday, 2 November 2026 10:23:58 Central European Standard Time Florian Weimer wrote: > * Andreas Schneider via devel: > >> It's things like, does the runtime detect when it is being run as SUID > >> and clean out / refuse to use environment variables (such as > >> LD_PRELOAD). A lot of this comes from the C library, so if Rust is > >> using glibc then that's a good start, but I guess the language itself > >> (or more likely, Rust-specific libraries) might require attention too. > > > > See > > > > https://gitlab.com/cryptomilk/usermode/-/blob/main/crates/userhelper/src/ > > env.rs?ref_type=heads > > > > which is exactly about that. > > Huh. Has thisc code actually been tested? Isn't the DANGEROUS_VARS > part dead code?
Yes, it is tested, and no, DANGEROUS_VARS is not dead code. is_dangerous_env_var() reads DANGEROUS_VARS and sanitize_env() calls it. sanitize_env() is called from pam.rs. Both exec paths build the child's environment from its result (into_env_vec()). https://gitlab.com/cryptomilk/usermode/-/blob/main/crates/userhelper/src/ pam.rs?ref_type=heads#L483 I emptied DANGEROUS_VARS and reran the tests. The GCONV_PATH, LOCPATH and NLSPATH tests failed, so the tests do cover that list. Best regards Andreas -- _______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
