The Samba-Bugzilla – Bug 13482
does not work with curl
Last modified: 2018-06-25 02:35:38 UTC
Works with `rwrap_example`.
RESOLV_WRAPPER_DEBUGLEVEL=4 ./rwrap_example a
RWRAP_TRACE(19981) - _rwrap_bind_symbol: Loaded __res_ninit from libc
RWRAP_TRACE(19981) - rwrap_res_nquery: Resolve the domain name [kdc.example.com] - class=1, type=1
RWRAP_TRACE(19981) - rwrap_res_nquery: nameserver: 10.137.2.1
RWRAP_TRACE(19981) - rwrap_res_nquery: nameserver: 10.137.2.254
RWRAP_TRACE(19981) - _rwrap_bind_symbol: Loaded __res_nquery from libresolv
RWRAP_TRACE(19981) - rwrap_res_nquery: The returned response length is: -1
Doesn't work with `curl` though?
LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF=/tmp/testresolv.conf RESOLV_WRAPPER_DEBUGLEVEL=4 curl google.com
Once I delete, `/etc/resolv.conf`, DNS resolution is broken. (`/tmp/testresolv.conf` being a copy of `/etc/resolv.conf`.)
Am I doing something wrong?
I guess curl uses https://c-ares.haxx.se/ so it doesn't call the libc res_* functions from libresolv.
From the webpage:
c-ares is being used by libcurl
Here we go. Check the c-ares documentation if it is possible to change the resolv.conf file :-)
Covering redirection of c-ares based applications is out of scope for the resolv_wrapper library project?
Yes, resolv_wrapper is only for libresolv.so nothing else :-)
Thanks for the clarification! :-)