trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.9k stars 79 forks source link

Add `env_editor` and `editor` abstractions to `sudoers/policy.rs` #698

Closed squell closed 1 year ago

squell commented 1 year ago

I.e. ideally we should have a function like fn check_editor(path: &Path) -> PathBuf or some such that takes an editor path representing a user preference (e.g. taken from the environment) and returns the editor that the policy has decided for the user.

Alternatively (and perhaps better), we could simply offer a fn editor() -> PathBuf that checks the environment itself (and the env_editor and editor settings) and resolves the editor. CC PR #697

pvdrz commented 1 year ago

Fixed by #702