X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/39a8cd101b922f08058746122efff58c14b57605..19894a1236eae932b4028640f24ab843f691d4e4:/unit-tests/test-cases/restrict-environ/main.c diff --git a/unit-tests/test-cases/restrict-environ/main.c b/unit-tests/test-cases/restrict-environ/main.c index c4c0da8..e68d038 100644 --- a/unit-tests/test-cases/restrict-environ/main.c +++ b/unit-tests/test-cases/restrict-environ/main.c @@ -23,6 +23,7 @@ #include // fprintf(), NULL #include // exit(), EXIT_SUCCESS #include // strcmp(), strncmp() +#include // dyld_process_is_restricted() #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL() @@ -58,6 +59,13 @@ int main(int argc, const char* argv[], const char* envp[], const char* apple[]) return EXIT_SUCCESS; } + // verify SPI says process is restricted + if ( !dyld_process_is_restricted() ) { + FAIL("restrict-environ: dyld_process_is_restrictet() returns false"); + return EXIT_SUCCESS; + } + + PASS("restrict-environ"); return EXIT_SUCCESS; }