X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/0959b6d4289bd106fddb7fe7d84a346159895fdd..d3f1e533acc7f70659b8bde9b6c040974f05e03b:/unit-tests/test-cases/fallback-with-suid/main.c?ds=inline diff --git a/unit-tests/test-cases/fallback-with-suid/main.c b/unit-tests/test-cases/fallback-with-suid/main.c index a0ce919..bb79393 100644 --- a/unit-tests/test-cases/fallback-with-suid/main.c +++ b/unit-tests/test-cases/fallback-with-suid/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -31,22 +31,12 @@ // binaries set to run as some other user id never use $HOME part of fallback-path // +extern void compress(); + int main(int argc, const char *argv[]) { - const struct mach_header* mh = NSAddImage("/foo/bar/libfoo.dylib", NSADDIMAGE_OPTION_RETURN_ON_ERROR); - - if ( strcmp(argv[1], "root") == 0 ) { - if ( mh == NULL ) - PASS("fallback-with-suid root"); - else - FAIL("fallback-with-suid root"); - } - else { - if ( mh != NULL ) - PASS("fallback-with-suid user"); - else - FAIL("fallback-with-suid user"); - } + if ( &compress != NULL ) + FAIL("fallback-with-suid root"); return EXIT_SUCCESS; }