From 6c951f4746af7ead43a49de203c073745f397d49 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 4 Dec 2024 10:28:04 +0100 Subject: [PATCH] .. --- src/linux/link.rs | 4 ++-- src/macos/link.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/linux/link.rs b/src/linux/link.rs index cc2eb3746..9d40f4b8e 100644 --- a/src/linux/link.rs +++ b/src/linux/link.rs @@ -15,7 +15,7 @@ use std::path::{Path, PathBuf}; use crate::post_process::relink::{RelinkError, Relinker}; use crate::recipe::parser::GlobVec; use crate::system_tools::{SystemTools, Tool}; -use crate::unix::permission_guard::PermissionGuard; +use crate::unix::permission_guard::{PermissionGuard, READ_WRITE}; use crate::utils::to_lexical_absolute; /// A linux shared object (ELF) @@ -215,7 +215,7 @@ impl Relinker for SharedObject { // keep only first unique item final_rpaths = final_rpaths.into_iter().unique().collect(); - let _permission_guard = PermissionGuard::new(&self.path, 0o200)?; + let _permission_guard = PermissionGuard::new(&self.path, READ_WRITE)?; // run builtin relink. if it fails, try patchelf if builtin_relink(&self.path, &final_rpaths).is_err() { diff --git a/src/macos/link.rs b/src/macos/link.rs index 451a0e98e..567dc2198 100644 --- a/src/macos/link.rs +++ b/src/macos/link.rs @@ -12,7 +12,7 @@ use std::path::{Path, PathBuf}; use crate::post_process::relink::{RelinkError, Relinker}; use crate::recipe::parser::GlobVec; use crate::system_tools::{SystemTools, Tool}; -use crate::unix::permission_guard::PermissionGuard; +use crate::unix::permission_guard::{PermissionGuard, READ_WRITE}; use crate::utils::to_lexical_absolute; /// A macOS dylib (Mach-O) @@ -258,7 +258,7 @@ impl Relinker for Dylib { } if modified { - let _permission_guard = PermissionGuard::new(&self.path, 0o200)?; + let _permission_guard = PermissionGuard::new(&self.path, READ_WRITE)?; // run builtin relink. if it fails, try install_name_tool match relink(&self.path, &changes) { Err(e) => {