1RESOLV_WRAPPER(1)                                            RESOLV_WRAPPER(1)
2
3
4

NAME

6       resolv_wrapper - A wrapper for dns name resolving or dns faking.
7

SYNOPSIS

9       LD_PRELOAD=libresolv_wrapper.so
10       RESOLV_WRAPPER_CONF="/path/to/resolv.conf" ./myapplication
11

DESCRIPTION

13       resolv_wrapper makes it possible on most UNIX platforms to contact your
14       own DNS implementation in your test environment. It requires
15       socket_wrapper to be able to contact it. If it doesn’t work on a
16       special platform the wrapper is able to fake DNS queries and return
17       valid responses to your application.
18
19       •   Redirects name queries to the nameservers specified in your
20           resolv.conf
21
22       •   Can fake DNS queries using a simple formatted DNS hosts file.
23

ENVIRONMENT VARIABLES

25       RESOLV_WRAPPER_CONF
26           This is used to specify the resolv.conf to use. The format of the
27           resolv.conf file is defined in the manpage resolv.conf(5).
28           Currently only the namserver directive is supported.
29
30       In order that this works with socket_wrapper. The res_* symbols need to
31       be in a separate libresolv library. If they are part of libc this wont
32       work. This is the case with glibc >= 2.34.
33
34       RESOLV_WRAPPER_HOSTS
35           This environment variable is used for faking DNS queries. It must
36           point to a hosts-like text file that specifies fake records for
37           custom queries. The format of the file looks like this:
38
39               TYPE    RECORD_NAME RECORD_VALUE
40
41       For example:
42
43           A       dc.cwrap.org 127.0.0.10
44           AAAA    dc.cwrap.org fd00::5357:5f0a
45           CNAME   kerberos.cwrap.org dc.cwrap.org
46           SRV     _kerberos._tcp.cwrap.org kerberos.cwrap.org 88
47           URI     _vpn.cwrap.org https://vpn.cwrap.org/VPN
48           TXT     cwrap.org v=spf1 mx
49
50       RESOLV_WRAPPER_DEBUGLEVEL
51           If you need to see what is going on in resolv_wrapper itself or try
52           to find a bug, you can enable logging support in resolv_wrapper if
53           you built it with debug symbols.
54
55           •   0 = ERROR
56
57           •   1 = WARNING
58
59           •   2 = DEBUG
60
61           •   3 = TRACE
62
63       RESOLV_WRAPPER_DISABLE_DEEPBIND
64           This allows you to disable deep binding in resolv_wrapper. This is
65           useful for running valgrind tools or sanitizers like (address,
66           undefined, thread).
67

EXAMPLE

69       The following command would trick kinit(1) into using DNS servers from
70       "./resolv.conf" for Kerberos service resolution:
71
72           $ LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="./resolv.conf" kinit user@EXAMPLE.COM
73

AUTHOR

75       The Samba Team
76
77
78
79                                  2021-11-03                 RESOLV_WRAPPER(1)
Impressum