trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.87k stars 76 forks source link

Improved error messages in case of configuration errors #835

Open squell opened 5 months ago

squell commented 5 months ago

Describe the feature you'd like see implemented in sudo-rs Improved error messages in case of a configuration mistake (see also #832).

For example:

In particular, perhaps some error messages are still a bit "developer"-ish (e.g. lazily using Rust's "{:?}" to format them).

What problem can be solved with this feature? Easier adoption of sudo-rs; for many users installing it will be a "manual" proces and having more informative error messages can help in troubleshooting mistakes caused by differences between Todd Miller's sudo and ours.

rnijveld commented 5 months ago

The issue with PAM configuration files missing is that a missing service configuration in /etc/pam.d/[service] is very much a valid configuration, and automatically falls back to /etc/pam.conf. If that is what a system administrator wants to configure then they should be able to.