-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some instructions unknown #15
Comments
@visuall are you sure you're using the latest version of The size of |
When trying to override
Note: this comment talked about |
@tyilo what git revision are you using? I'm on 919148f and It hooks I use the following #include <stdio.h>
#include <assert.h>
#include <Security/Security.h>
#include "mach_override.h"
OSStatus my_SecCodeCheckValidityWithErrors(SecCodeRef a, SecCSFlags b, SecRequirementRef c, CFErrorRef* d)
{
printf( "SEEMS LEGIT\n" );
return KERN_SUCCESS;
}
int main( int argc, const char *argv[] ) {
OSStatus (*orig_SecCodeCheckValidityWithErrors)(SecCodeRef, SecCSFlags, SecRequirementRef, CFErrorRef*) = NULL;
int err = mach_override_ptr((void *)SecCodeCheckValidityWithErrors,
(void *)my_SecCodeCheckValidityWithErrors,
(void **)&orig_SecCodeCheckValidityWithErrors);
assert(KERN_SUCCESS == err);
int orig_return = orig_SecCodeCheckValidityWithErrors(0, 0, 0 ,0);
int my_return = my_SecCodeCheckValidityWithErrors(0, 0, 0, 0);
int straight_return = SecCodeCheckValidityWithErrors(0, 0, 0, 0);
assert(orig_return != my_return);
assert(my_return == straight_return);
printf("success\n");
return 0;
} and the build command: $ gcc -o build/test_gcc_x86_64 -m64 -framework Security *.c libudis86/*.c
$ build/test_gcc_x86_64 |
I was using the unstable branch as I thought that was the newest version, as both test binaries created with |
Yeah, Weird situation. There's a pull request for merging /cc @rentzsch |
Hi there ... I am using mach_override for one of my projects. It hooks successfully some functions and works great but fails for others.
One example for failure is CFBundleCreate. I am developing with Xcode 5.1.1 running on Maverick .
The text was updated successfully, but these errors were encountered: