Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Dec 4, 2024
1 parent ed41ffb commit 6c951f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/linux/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/macos/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 6c951f4

Please sign in to comment.