View previous topic :: View next topic |
Author |
Message |
doublehp Guru
Joined: 11 Apr 2005 Posts: 473 Location: FRANCE
|
Posted: Thu Jun 28, 2012 7:26 am Post subject: resolv names via env var ? |
|
|
Hello, I am aware that name resolution USUALLY goes via resolv.conf, and that this detail can be changed via nsswitch.conf.
In Android, the DNS server is stored in an env var. How to make a classic Linux like Gentoo also resolv names via an env var, and possibly custom this aspect via nsswitch ?
Ie, I would do sth like this: replace "hosts: files dns" with "hosts: var files dns" ...
Then, same question for networks.
Thanks. _________________ DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Jun 28, 2012 1:40 pm Post subject: Re: resolv names via env var ? |
|
|
doublehp wrote: | [...] Ie, I would do sth like this: replace "hosts: files dns" with "hosts: var files dns" ... |
doublehp ... this would require patching glibc. This facility is provided by /lib/libnss_files.so.2 and /lib/libnss_dns.so.2 and anything that calls 'gethostbyname' will refer to these to have it resolved. I'm not familair with anything that might provide 'var' but glibc is what would need changed in order to support such a thing.
HTH & best ...
khay |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|