• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5


  • Subject: Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
  • From: Peter O'Gorman <email@hidden>
  • Date: Thu, 02 Apr 2009 13:14:33 -0500

Alexander Samoylovich wrote:
> Hello.
>
> I am trying to interpose getaddrinfo and freeaddrinfo functions. For
> this purpose I use DYLD_INSERT_LIBRARIES environment variable.
> The library source and the shell script to run an application to be
> hooked are below.
> This trick works for Mac OS X 10.4 for Safari, Firefox and curl. But
> under Mac OS X 10.5 it works with Firefox and curl but not with Safari.
> For Safari the library hooks freeaddrinfo but not getarrdinfo. The real
> application also interposes connect and connect$UNIX2003 and works for
> all application and all OSes.
>
> So the question:
>
> Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5? Is there
> any way to force it to work the same way and to interpose getaddrinfo too?

Are you sure that Safari calls getaddrinfo, and not getaddrinfo_async*?

$ nm -g /usr/lib/libSystem.dylib | grep getaddrinfo
00067613 T _getaddrinfo
001144bf T _getaddrinfo_async_cancel
0004f75e T _getaddrinfo_async_handle_reply
001145f8 T _getaddrinfo_async_receive
001144da T _getaddrinfo_async_send
0004efda T _getaddrinfo_async_start

http://www.opensource.apple.com/darwinsource/10.5.6/Libinfo-278.0.3/lookup.subproj/netdb_async.h

Peter
--
Peter O'Gorman
http://pogma.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
      • From: Alexander Samoylovich <email@hidden>
    • Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
      • From: Alexander Samoylovich <email@hidden>
References: 
 >Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5 (From: Alexander Samoylovich <email@hidden>)

  • Prev by Date: CFShow truncated CFStrings in Leopard's Console.app (but not Xcode's debugger console)
  • Next by Date: Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
  • Previous by thread: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
  • Next by thread: Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
  • Index(es):
    • Date
    • Thread