Skip to content

Commit ce7fc89

Browse files
committed
Use the same PATH default for sudo and visudo
1 parent aebafce commit ce7fc89

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ fn main() {
3131
println!("cargo:rerun-if-changed=build.rs");
3232

3333
println!("cargo:rustc-link-lib=pam");
34-
35-
println!("cargo:rustc-env=DEFAULT_PATH=/usr/bin:/bin:/usr/sbin:/sbin");
3634
}

src/sudoers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ impl Sudoers {
259259
}
260260
let path = resolve_path(
261261
path,
262-
&std::env::var("PATH").unwrap_or(env!("DEFAULT_PATH").to_string()),
262+
&std::env::var("PATH").unwrap_or(env!("SUDO_PATH_DEFAULT").to_string()),
263263
);
264264
if let Some(path) = path {
265265
return Some(path);

0 commit comments

Comments
 (0)