Bug 30683 - Add environment override for /etc/resolv.conf path
Summary: Add environment override for /etc/resolv.conf path
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.38
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-25 17:16 UTC by Carlos O'Donell
Modified: 2023-07-25 17:16 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Donell 2023-07-25 17:16:15 UTC
We support RESOLV_HOST_CONF to override /etc/hosts.conf, so it makes sense to extend this to override /etc/resolv.conf.

Possible options include a RESOLV_CONF environment variable.

Example:
RESOLV_CONF=/tmp/resolv.conf getent ahosts example.org

Should this be a tunable that has an environment variable specified?
e.g. GLIBC_TUNABLES=glibc.resolv.conf=/tmp/resolv.conf

It would have to be SXID_ERASE (default) IMO since AT_SECURE should not alter their resolver configurations and subprocesses should also consistently produce the same resolution results as the parent process.