Re: intercepting system calls works on tiger(10.4.5) but not on panther(10.3.9)
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com - Kevin On May 17, 2006, at 7:18 AM, Peter O'Gorman wrote: On Tue, 2006-05-16 at 23:01 -0600, Puthali H.B wrote: Actually I've a dynamic library which over-rides system calls, namely connect,recv,send,sendto,accept... and when I preload this on Tiger, using DYLD_INSERT_LIBRARIES AND DYLD_FORCE_FLAT_NAMESPACE, everything works fine. When I pre-loaded this library in terminal and ran FTP got the following error- dyld: FTP multiple definitions of symbol _connect test_connect.dylib(ccyRQhrn.o) definition of _connect /usr/lib/libSystem.B.dylib(connect.So) definition of _connect Trace/BPT trap Works for me on panther (10.3.9): peter$ cc -dynamiclib -o test_connect.dylib connect.c peter$ env DYLD_INSERT_LIBRARIES=./test_connect.dylib DYLD_FORCE_FLAT_NAMESPACE=1 ftp ftp.pogma.com Connect Called ftp: connect: Unknown error: 0 ftp> quit peter$ cat connect.c #include <stdio.h> int connect() { fprintf(stderr,"Connect Called\n"); return 1; } I assume that you're doing something different? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I've used this approach for intercepting syscalls successfully (on 10.3.9), you can see what I've done here: <http://cvs.opendarwin.org/cgi-bin/cvsweb.cgi/projects/darwinbuild/ darwintrace/> Peter _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/kevin% 40opendarwin.org This email sent to kevin@opendarwin.org This email sent to site_archiver@lists.apple.com
participants (1)
-
Kevin Van Vechten