]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/fallback-with-suid/main.c
dyld-750.6.tar.gz
[apple/dyld.git] / unit-tests / test-cases / fallback-with-suid / main.c
index a0ce919778c147ab4da5e53652500b5750d9cbb3..bb793934cf6eb2e160ae3b4e21d66e953d63e1ad 100644 (file)
@@ -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@
  * 
 // 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;
 }