sudo-rs icon indicating copy to clipboard operation
sudo-rs copied to clipboard

`env_keep = "KEY=()*"` does not preserve the env var `KEY=() value`

Open japaric opened this issue 2 years ago • 0 comments
trafficstars

relevant test

https://github.com/memorysafety/sudo-rs/blob/719fcfe24401e7d71ec029ec799428702ae47a0e/test-framework/sudo-compliance-tests/src/sudoers/env_keep.rs#L369-L384

ogsudo removes env vars that start with () even if they appear by name in env_keep. the prevent the removal of such env vars the parentheses-glob variant of the key-value syntax must be used: KEY=()*. ogsudo preserves the env var whose values starts with () in the above test but sudo-rs does not

also see #344

NOTE: also affects env_check

japaric avatar May 24 '23 16:05 japaric