mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-23 15:46:13 -05:00
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:
1 parent
2160bd82f8
commit
69155d04b9
4 files changed
+260
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user