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       RESOLV_WRAPPER_HOSTS
31           This environment variable is used for faking DNS queries. It must
32           point to a hosts-like text file that specifies fake records for
33           custom queries. The format of the file looks like this:
34
35               TYPE    RECORD_NAME RECORD_VALUE
36
37       For example:
38
39           A       dc.cwrap.org 127.0.0.10
40           AAAA    dc.cwrap.org fd00::5357:5f0a
41           CNAME   kerberos.cwrap.org dc.cwrap.org
42           SRV     _kerberos._tcp.cwrap.org kerberos.cwrap.org 88
43           URI     _vpn.cwrap.org https://vpn.cwrap.org/VPN
44           TXT     cwrap.org v=spf1 mx
45
46       RESOLV_WRAPPER_DEBUGLEVEL
47           If you need to see what is going on in resolv_wrapper itself or try
48           to find a bug, you can enable logging support in resolv_wrapper if
49           you built it with debug symbols.
50
51           ·   0 = ERROR
52
53           ·   1 = WARNING
54
55           ·   2 = DEBUG
56
57           ·   3 = TRACE
58
59       RESOLV_WRAPPER_DISABLE_DEEPBIND
60           This allows you to disable deep binding in resolv_wrapper. This is
61           useful for running valgrind tools or sanitizers like (address,
62           undefined, thread).
63

EXAMPLE

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

AUTHOR

71       The Samba Team
72           Author.
73
74
75
76                                  2020-01-31                 RESOLV_WRAPPER(1)
Impressum