Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/common/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ fn get_canonical_util_name(util_name: &str) -> &str {
/// Gets the binary path from command line arguments
/// Panics if the binary path cannot be determined
#[cfg(any(
not(any(target_os = "linux", target_os = "android")),
not(any(
target_os = "linux",
all(target_os = "android", target_pointer_width = "64")
)),
target_env = "musl"
))]
pub fn binary_path(args: &mut impl Iterator<Item = OsString>) -> PathBuf {
Expand All @@ -88,7 +91,10 @@ pub fn binary_path(args: &mut impl Iterator<Item = OsString>) -> PathBuf {
/// Get actual binary path from kernel, not argv0, to prevent `env -a` from bypassing
/// AppArmor, SELinux policies on hard-linked binaries
#[cfg(all(
any(target_os = "linux", target_os = "android"),
any(
target_os = "linux",
all(target_os = "android", target_pointer_width = "64")
),
not(target_env = "musl")
))]
pub fn binary_path(args: &mut impl Iterator<Item = OsString>) -> PathBuf {
Expand Down
Loading