X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/197008ea33f135c7c4f94a67a2f75a9df7b7771d..39a8cd101b922f08058746122efff58c14b57605:/unit-tests/test-cases/rpath-indirect-suid/Makefile diff --git a/unit-tests/test-cases/rpath-indirect-suid/Makefile b/unit-tests/test-cases/rpath-indirect-suid/Makefile index a1ec99e..fa534f2 100644 --- a/unit-tests/test-cases/rpath-indirect-suid/Makefile +++ b/unit-tests/test-cases/rpath-indirect-suid/Makefile @@ -23,6 +23,7 @@ TESTROOT = ../.. include ${TESTROOT}/include/common.makefile +PWD = $(shell pwd) # # a setuid main executable linked with -rpath links against a dylib @@ -30,8 +31,9 @@ include ${TESTROOT}/include/common.makefile # LC_RPATH uses @loader_path or a relative path, but ok if it is an absolute path # +all-check: all check -run: all +check: ./main || echo "FAIL rpath-indirect-suid absolute path" ${TESTROOT}/bin/exit-non-zero-pass.pl "rpath-indirect-suid @loader_path path" "rpath-indirect-suid @loader_path path" ./main_bad1 ${TESTROOT}/bin/exit-non-zero-pass.pl "rpath-indirect-suid relative path" "rpath-indirect-suid relative path" ./main_bad2 @@ -44,10 +46,10 @@ hide/hole/libbar.dylib : bar.c ${CC} bar.c -dynamiclib -o hide/hole/libbar.dylib -install_name @rpath/libbar.dylib libfoo.dylib : foo.c hide/hole/libbar.dylib - ${CC} foo.c -dynamiclib -o "`pwd`/libfoo.dylib" hide/hole/libbar.dylib + ${CC} foo.c -dynamiclib -o "${PWD}/libfoo.dylib" hide/hole/libbar.dylib main : main.c libfoo.dylib - ${CC} -I${TESTROOT}/include main.c -o main libfoo.dylib -Wl,-rpath -Wl,`pwd`/hide/hole + ${CC} -I${TESTROOT}/include main.c -o main libfoo.dylib -Wl,-rpath -Wl,${PWD}/hide/hole sudo chown root main sudo chmod 4755 main