-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SETENV/NOSETENV option #760
Comments
// cc @nbraud |
@mkg20001 There's also the
In the NixOS PR, I made this configurable and disabled-by-default when using PS: Got NixOS' testsuite to pass with |
Thanks for requesting.
Back in may, we decided to postpone this feature because we were taking a stricter stance on |
I'm glad we can provide you with useful feedback. I might get around to submitting a patch for #61, but don't wait up on me either: given my state of health, I can't commit to doing it in a timely manner.
That's a good question... I don't know 😓 To be clear, I am not a NixOS project member, I just send PRs... including the ones for IMO, the most sensible way forward for NixOS might well be:
|
Duplicated sudo's testsuite for now, as its maintainer does not with to collaborate on testing effors; see NixOS#253876. Environment-related tests were removed, as sudo-rs does not support `(NO)SETENV` yet; see trifectatechfoundation/sudo-rs#760
I like the approach of "letting users tell us what they actually need" |
One easy step to take is of course to implement SETENV as a "dummy" tag (i.e. we accept it, but still |
It's a good idea, but it will lead to confusing problems later. When something that explicitly depends on SETENV starts failing after switching to sudo-rs is much more confusing to debug vs sudo-rs straight out rejecting the option. Maybe add dummy and then give a specific error message about the missing SETENV feature would be an idea? |
I believe the reason NixOS uses SETENV is that it installs a lot of packages in the user environment that the user may want to run as root. An unsuccessful attempt to remove it was made a few years ago. There might be a better way to do this nowadays. |
Duplicated sudo's testsuite for now, as its maintainer does not with to collaborate on testing effors; see NixOS#253876. Environment-related tests were removed, as sudo-rs does not support `(NO)SETENV` yet; see trifectatechfoundation/sudo-rs#760
If I may step in, I find that |
Describe the feature you'd like see implemented in
sudo-rs
The SETENV/NOSETENV option currently is missing
What problem can be solved with this feature?
Currently the nixos sudo configuration uses setenv in some places, which we conditionally don't add when using sudo-rs
https://github.com/NixOS/nixpkgs/pull/253876/files#diff-5c91de272e9391a78a1d22be54a571b5dd3585be6e5968f0f62a7c9a790066b1R43
Having this feature would allow feature parity with regular sudo configurations on nixos
Describe alternatives you've considered
Currently we disable adding SETENV/NOSETENV when sudo-rs is in use
Additional context
The text was updated successfully, but these errors were encountered: