On Sun, Dec 08, 2002 at 03:53:00AM +0200, guy keren wrote:
> 
> i'm trying to 'fake' DNS settings for a _single_ process on a linux box 
> (i.e. when this process will query for the address of a given host, it 
> will get a reply i set a-priory, while other processes will get the proper 
> repely).
> 
> i noticed there are various environment variables that allow overriding 
> various settings for the resolver library, but they don't seem to allow 
> enough control to actually override such settings, without changing the 
> settings for the whole box. i've been searching on google, and looking for 
> info in the o'rreily "DNS and bind" book - to no avail.
> 
> if anyone has an idea if such a feature is available - i'd be glad for any 
> pointer. it sounds odd for such a feature not to be already available via 
> the default libraries.
> 
> thanks,

It should be relatively trivial to write a wrapper for the resolver functions
which will be preloaded for one specific process. See the LD_PRELOAD
environment variable, and the assorted dynamic linker functions in order
to get started.

        -- Yotam Rubin

Attachment: msg23782/pgp00000.pgp
Description: PGP signature

Reply via email to