X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/39a8cd101b922f08058746122efff58c14b57605..a9a4db61c29ec8455dcb07f607391cd82e933936:/unit-tests/test-cases/restrict-executable_path/Makefile diff --git a/unit-tests/test-cases/restrict-executable_path/Makefile b/unit-tests/test-cases/restrict-executable_path/Makefile index b222951..ceb2e3b 100644 --- a/unit-tests/test-cases/restrict-executable_path/Makefile +++ b/unit-tests/test-cases/restrict-executable_path/Makefile @@ -20,11 +20,17 @@ # # @APPLE_LICENSE_HEADER_END@ ## -TESTROOT = ../.. +PWD = $(shell pwd) +TESTROOT = $(PWD)/../.. include ${TESTROOT}/include/common.makefile SHELL = bash # use bash shell so we can redirect just stderr +ifeq "$(OS_NAME)" "iPhoneOS" + RUN_AS_USER = login -f -l mobile +else + RUN_AS_USER = +endif # # Use of @exectuable_path in restricted binaries is not allowed @@ -35,10 +41,9 @@ SHELL = bash # use bash shell so we can redirect just stderr all-check: all check check: - ${TESTROOT}/bin/exit-non-zero-pass.pl "restrict-executable_path @executable_path" "restrict-executable_path @executable_path" ./main_exe "restrict-executable_path" - ${TESTROOT}/bin/exit-non-zero-pass.pl "restrict-executable_path @loader_path" "restrict-executable_path @loader_path" ./main_loader "restrict-executable_path" - ${TESTROOT}/bin/exit-non-zero-pass.pl "restrict-executable_path relative path" "restrict-executable_path relative path" ./main_rel "restrict-executable_path" - + ${RUN_AS_USER} ${PASS_IFF_FAILURE} "setuid-executable_path @executable_path" "setuid-executable_path @executable_path" $(PWD)/main_exe + ${RUN_AS_USER} ${PASS_IFF_FAILURE} "setuid-executable_path @loader_path" "setuid-executable_path @loader_path" $(PWD)/main_loader + ${RUN_AS_USER} ${PASS_IFF_FAILURE} "setuid-executable_path relative path" "setuid-executable_path relative path" $(PWD)/main_rel all: main_exe main_loader main_rel