feat(gphip): add HIP detection for BitDefender GravityZone on Linux (#729)

* feat(gphip): add HIP detection for BitDefender GravityZone on Linux

* fix(gphip): reuse trusted paths for Bitdefender detection

---------

Co-authored-by: Kevin Yue <[email protected]>
This commit is contained in:
Francis DevereuxandKevin Yue authored and GitHub committed 2026-11-23 22:48:33 +08:00
1 parent 2160bd82f8
commit 69155d04b9
4 files changed
+260 -1

No files matched your search

+3 -1
View File
@@ -127,7 +127,9 @@ pub fn command_path(require_root: bool) -> io::Result<std::ffi::OsString> {
std::env::join_paths(directories).map_err(|error| io::Error::new(io::ErrorKind::InvalidInput, error))
}
fn root_owned_path(path: &Path) -> bool {
/// Whether `path` and every ancestor are root-owned, not symlinks, and not
/// group/world-writable (unless a root-owned sticky ancestor protects them).
pub fn root_owned_path(path: &Path) -> bool {
path.ancestors().all(|part| {
fs::symlink_metadata(part).is_ok_and(|metadata| {
let mode = metadata.permissions().mode();