27 lines
682 B
Diff
27 lines
682 B
Diff
--- a/src/sudo/mod.rs
|
|
+++ b/src/sudo/mod.rs
|
|
50,61c50,59
|
|
< let mut path = if cfg!(target_os = "freebsd") {
|
|
< option_env!("LOCALBASE").unwrap_or("/usr/local").into()
|
|
< } else {
|
|
< PathBuf::from("/")
|
|
< };
|
|
< path.push("etc/sudoers-rs");
|
|
< if !path.exists() {
|
|
< path.set_file_name("sudoers");
|
|
< };
|
|
<
|
|
< dev_info!("Running with {} file", path.display());
|
|
< path
|
|
---
|
|
> let user = PathBuf::from("/var/config/sudo/sudoers");
|
|
> if !user.exists() {
|
|
> if let Ok(mut path) = std::env::current_exe() {
|
|
> path.pop();
|
|
> path.pop();
|
|
> path.push("share/config/sudoers");
|
|
> return path;
|
|
> }
|
|
> }
|
|
> user
|