Skip to content
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

Add feature to enable/disable usage of the sudo-i pam service name #903

Open
bjorn3 opened this issue Nov 4, 2024 · 1 comment
Open
Labels
enhancement New feature or request portability

Comments

@bjorn3
Copy link
Collaborator

bjorn3 commented Nov 4, 2024

Describe the feature you'd like see implemented in sudo-rs
See title

What problem can be solved with this feature?
It varies a lot between systems whether or not /etc/pam.d/sudo-i is used or not. This is not directly correlated with the target os, so using #[cfg] is not possible. For example upstream sudo only enables --with-pam-login to use /etc/pam.d/sudo-i on the RedHat family of distros, but Debian also manually enables it for their distro packages: https://salsa.debian.org/sudo-team/sudo/-/blob/master/debian/rules?ref_type=heads#L18

Describe alternatives you've considered
Using #[cfg(target_os = "linux")] to enable it, but this wouldn't work on distros like Alpine that don't use --with-pam-login.

@bjorn3 bjorn3 added the enhancement New feature or request label Nov 4, 2024
@squell
Copy link
Member

squell commented Nov 4, 2024

I concur; we've had this issue with Arch Linux before (see issue #832). I think the feature flag mechanism is the correct way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request portability
Projects
None yet
Development

No branches or pull requests

2 participants