[PATCH] resolv/resolv.h: allow alternative resolv.conf files
Carlos O'Donell
carlos@redhat.com
Thu Aug 17 15:21:00 GMT 2017
On 08/17/2017 10:32 AM, Renzo Davoli wrote:
>> _PATH_RESCONF really has to be a string literal, and you can't use a GNU
>> C extension in such a way in an installed header file.
>>
>> The environment variable would have to be ignored in AT_SECURE mode, so
>> you have to use __libc_secure_getenv or put it into unsecvars.h.
>
> Here is a different implementation:
> * it does not use any gcc extension
> * use __libc_secure_getenv instead of getenv
> * do not change installed header files.
You ask:
"Why to obtain a so simple feature should I have to overlay mount /etc?"
and the answer is:
* It complicates the glibc design when an overlay mount already exists.
* Environment variables are brittle and may be cleared in certain
or unused in certain circumstances.
The most robust solution is an overlay mount in /etc.
Is there anything technically wrong with the overlay mount?
The overlay mount is semantically clearer than another env var that
changes existing behaviour.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list