From c4a164ff310a89ca8af6db1dcd5916fda238dd10 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sun, 3 Nov 2024 22:02:05 +0100 Subject: [PATCH] darwintracelib1.0: re-enable proc tests on arm64 Relax the path check in sipp_copy_proc.c so that it also passes in the build tree, not only in the install location. --- src/darwintracelib1.0/tests/proc.test | 4 ---- src/pextlib1.0/sip_copy_proc.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/darwintracelib1.0/tests/proc.test b/src/darwintracelib1.0/tests/proc.test index d385c0389c..927aea33ad 100644 --- a/src/darwintracelib1.0/tests/proc.test +++ b/src/darwintracelib1.0/tests/proc.test @@ -7,8 +7,6 @@ package require Pextlib 1.0 source "testlib.tcl" -testConstraint notarm64 [expr {[exec -ignorestderr -- /usr/bin/arch] ne "arm64"}] - test execve_selfpreserving_env "Test that you cannot get out of the sandbox by unsetting environment variables" \ -setup [setup [list allow $cwd]] \ -cleanup [expect] \ @@ -211,7 +209,6 @@ test spawn_non_existing_inside_sandbox "Test that posix_spawn(2) on a non-existi # Apple-signed binaries, or arbitrary binaries on systems that are booted with # boot-args=-arm64e_preview_abi (which cannot be enabled without disabling SIP). test spawn_sip_binary "Test that posix_spawn(2) works on a SIP-protected binary (which will make a copy)" \ - -constraints {notarm64} \ -setup { file delete -force [file join $::env(DARWINTRACE_SIP_WORKAROUND_PATH) [getuid] usr/bin/env] [setup [list allow /]] @@ -235,7 +232,6 @@ test spawn_sip_binary "Test that posix_spawn(2) works on a SIP-protected binary # Apple-signed binaries, or arbitrary binaries on systems that are booted with # boot-args=-arm64e_preview_abi (which cannot be enabled without disabling SIP). test spawn_sip_script "Test that posix_spawn(2) works on a SIP-protected shell script (which will copy the interpreter)" \ - -constraints {notarm64} \ -setup [setup [list allow /]] \ -cleanup [expect {}] \ -body {exec -ignorestderr -- ./posix_spawn /usr/bin/umask} \ diff --git a/src/pextlib1.0/sip_copy_proc.c b/src/pextlib1.0/sip_copy_proc.c index a9d91ab9cb..2b95275d58 100644 --- a/src/pextlib1.0/sip_copy_proc.c +++ b/src/pextlib1.0/sip_copy_proc.c @@ -487,7 +487,7 @@ static int resign(const char *filepath) { } static struct timespec determine_pextlib_mtime(void) { - const char *needle_darwintrace = "/darwintrace1.0/darwintrace.dylib"; + const char *needle_darwintrace = "/darwintrace.dylib"; size_t needle_darwintrace_len = strlen(needle_darwintrace); const char *needle_pextlib = "/pextlib1.0/Pextlib.dylib"; size_t needle_pextlib_len = strlen(needle_pextlib);