Make this a separate commit: That is the feature that libc unfortunately does
not give us.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
state->qtype = qtype;
if (resolv_conf_fp == NULL) {
- fp = fopen("/etc/resolv.conf", "r");
+ const char *resolvconf = "/etc/resolv.conf";
+
+#ifdef DEVELOPER
+ {
+ const char *envvar = getenv("RESOLV_CONF");
+ if (envvar != NULL) {
+ resolvconf = envvar;
+ }
+ }
+#endif
+
+ fp = fopen(resolvconf, "r");
if (fp == NULL) {
tevent_req_error(req, errno);
return tevent_req_post(req, ev);