Subject: Re: re-reading /etc/resolv.conf on change
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 01/01/2004 16:55:45
>> I though about adding a environement variable [...]
> All of that sounds just about as dangerous as that stupid HOSTALISES
> thing that I've ripped out of my own resolver code.
> If you don't have the rights on some machine to change
> /etc/resolv.conf then you shouldn't have the right to tell the
> resolver to use some other configuration, even if it is only rope for
> your own execution.
I can't see what the issue is. The resolver is entirely userland;
programs can provide a different one of their own with whatever
semantics they feel like. Making the libc resolver honour a handful of
environment variables provides that flexibility to all programs
automatically. This seems to me like a Good Thing; since you obviously
disagree, there's something at least one of us is missing.
What perceived problem are you trying to fix here?
> It would be nice to be able to tell res_init() to use a different
> file, and its name could be passed through from a command-line option
> given to the daemon (i.e. you can change it if you have the rights to
> (re)start the daemon), [...] -- in no case should the generic
> libc/libresolv code arbitrarily honour any environment variable that
> affects its configuration.
I still can't see why not. Anyone who can restart a given daemon can
also start a different implementation that contains a resolver with
whatever semantics are desired.
Or are you talking about an environment in which not even admins are
permitted to import and run arbitrary executables? I have trouble
seeing how such a thing could be useful.
Again, what perceived problem are you trying to fix?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B