From c741eabfaad7a611bdb6cb6bac5bbe53ca4582cc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 3 Nov 2021 15:22:44 +0100 Subject: [PATCH] doc: Update documentation for glibc 2.34 changes Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- doc/resolv_wrapper.1 | 166 +++++++++++++++++++------------------- doc/resolv_wrapper.1.adoc | 4 + 2 files changed, 89 insertions(+), 81 deletions(-) diff --git a/doc/resolv_wrapper.1 b/doc/resolv_wrapper.1 index 1def7e8..ccbf282 100644 --- a/doc/resolv_wrapper.1 +++ b/doc/resolv_wrapper.1 @@ -1,50 +1,54 @@ '\" t .\" Title: resolv_wrapper .\" Author: The Samba Team -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 2020-01-31 +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2021-11-03 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "RESOLV_WRAPPER" "1" "2020\-01\-31" "\ \&" "\ \&" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.TH "RESOLV_WRAPPER" "1" "2021-11-03" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation +.ss \n[.ss] 0 .nh -.\" disable justification (adjust text to left margin only) .ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} .SH "NAME" -resolv_wrapper \- A wrapper for dns name resolving or dns faking\&. +resolv_wrapper \- A wrapper for dns name resolving or dns faking. .SH "SYNOPSIS" .sp -LD_PRELOAD=libresolv_wrapper\&.so RESOLV_WRAPPER_CONF="/path/to/resolv\&.conf" \fB\&./myapplication\fR +LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="/path/to/resolv.conf" \fB./myapplication\fP .SH "DESCRIPTION" .sp -resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS implementation in your test environment\&. It requires socket_wrapper to be able to contact it\&. If it doesn\(cqt work on a special platform the wrapper is able to fake DNS queries and return valid responses to your application\&. +resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS +implementation in your test environment. It requires socket_wrapper to be able +to contact it. +If it doesn\(cqt work on a special platform the wrapper is able to fake DNS queries +and return valid responses to your application. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} -Redirects name queries to the nameservers specified in your resolv\&.conf +Redirects name queries to the nameservers specified in your resolv.conf .RE .sp .RS 4 @@ -52,64 +56,67 @@ Redirects name queries to the nameservers specified in your resolv\&.conf \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} -Can fake DNS queries using a simple formatted DNS hosts file\&. +Can fake DNS queries using a simple formatted DNS hosts file. .RE .SH "ENVIRONMENT VARIABLES" -.PP -\fBRESOLV_WRAPPER_CONF\fR +.sp +\fBRESOLV_WRAPPER_CONF\fP .RS 4 -This is used to specify the resolv\&.conf to use\&. The format of the resolv\&.conf file is defined in the manpage -\fIresolv\&.conf(5)\fR\&. Currently only the -\fBnamserver\fR -directive is supported\&. +This is used to specify the resolv.conf to use. The format of the resolv.conf +file is defined in the manpage \fIresolv.conf(5)\fP. Currently only the \fBnamserver\fP +directive is supported. .RE -.PP -\fBRESOLV_WRAPPER_HOSTS\fR -.RS 4 -This environment variable is used for faking DNS queries\&. It must point to a hosts\-like text file that specifies fake records for custom queries\&. The format of the file looks like this: .sp -.if n \{\ +In order that this works with socket_wrapper. The res_* symbols need to be in +a separate libresolv library. If they are part of libc this wont work. This is +the case with glibc >= 2.34. +.sp +\fBRESOLV_WRAPPER_HOSTS\fP .RS 4 -.\} +This environment variable is used for faking DNS queries. It must point to a +hosts\-like text file that specifies fake records for custom queries. The +format of the file looks like this: +.sp +.if n .RS 4 .nf +.fam C TYPE RECORD_NAME RECORD_VALUE +.fam .fi -.if n \{\ -.RE -.\} +.if n .RE .RE .sp For example: .sp -.if n \{\ -.RS 4 -.\} +.if n .RS 4 .nf -A dc\&.cwrap\&.org 127\&.0\&.0\&.10 -AAAA dc\&.cwrap\&.org fd00::5357:5f0a -CNAME kerberos\&.cwrap\&.org dc\&.cwrap\&.org -SRV _kerberos\&._tcp\&.cwrap\&.org kerberos\&.cwrap\&.org 88 -URI _vpn\&.cwrap\&.org https://vpn\&.cwrap\&.org/VPN -TXT cwrap\&.org v=spf1 mx +.fam C +A dc.cwrap.org 127.0.0.10 +AAAA dc.cwrap.org fd00::5357:5f0a +CNAME kerberos.cwrap.org dc.cwrap.org +SRV _kerberos._tcp.cwrap.org kerberos.cwrap.org 88 +URI _vpn.cwrap.org https://vpn.cwrap.org/VPN +TXT cwrap.org v=spf1 mx +.fam .fi -.if n \{\ -.RE -.\} -.PP -\fBRESOLV_WRAPPER_DEBUGLEVEL\fR +.if n .RE +.sp +\fBRESOLV_WRAPPER_DEBUGLEVEL\fP .RS 4 -If you need to see what is going on in resolv_wrapper itself or try to find a bug, you can enable logging support in resolv_wrapper if you built it with debug symbols\&. +If you need to see what is going on in resolv_wrapper itself or try to find a +bug, you can enable logging support in resolv_wrapper if you built it with +debug symbols. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} 0 = ERROR .RE @@ -119,8 +126,8 @@ If you need to see what is going on in resolv_wrapper itself or try to find a bu \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} 1 = WARNING .RE @@ -130,8 +137,8 @@ If you need to see what is going on in resolv_wrapper itself or try to find a bu \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} 2 = DEBUG .RE @@ -141,33 +148,30 @@ If you need to see what is going on in resolv_wrapper itself or try to find a bu \h'-04'\(bu\h'+03'\c .\} .el \{\ -.sp -1 -.IP \(bu 2.3 +. sp -1 +. IP \(bu 2.3 .\} 3 = TRACE .RE .RE -.PP -\fBRESOLV_WRAPPER_DISABLE_DEEPBIND\fR +.sp +\fBRESOLV_WRAPPER_DISABLE_DEEPBIND\fP .RS 4 -This allows you to disable deep binding in resolv_wrapper\&. This is useful for running valgrind tools or sanitizers like (address, undefined, thread)\&. +This allows you to disable deep binding in resolv_wrapper. This is useful for +running valgrind tools or sanitizers like (address, undefined, thread). .RE .SH "EXAMPLE" .sp -The following command would trick \fIkinit(1)\fR into using DNS servers from "\&./resolv\&.conf" for Kerberos service resolution: +The following command would trick \fIkinit(1)\fP into using DNS servers from "./resolv.conf" +for Kerberos service resolution: .sp -.if n \{\ -.RS 4 -.\} +.if n .RS 4 .nf -$ LD_PRELOAD=libresolv_wrapper\&.so RESOLV_WRAPPER_CONF="\&./resolv\&.conf" kinit user@EXAMPLE\&.COM +.fam C +$ LD_PRELOAD=libresolv_wrapper.so RESOLV_WRAPPER_CONF="./resolv.conf" kinit user@EXAMPLE.COM +.fam .fi -.if n \{\ -.RE -.\} +.if n .RE .SH "AUTHOR" -.PP -\fBThe Samba Team\fR -.RS 4 -Author. -.RE +.sp +The Samba Team \ No newline at end of file diff --git a/doc/resolv_wrapper.1.adoc b/doc/resolv_wrapper.1.adoc index 5b23dac..2387909 100644 --- a/doc/resolv_wrapper.1.adoc +++ b/doc/resolv_wrapper.1.adoc @@ -34,6 +34,10 @@ This is used to specify the resolv.conf to use. The format of the resolv.conf file is defined in the manpage 'resolv.conf(5)'. Currently only the *namserver* directive is supported. +In order that this works with socket_wrapper. The res_* symbols need to be in +a separate libresolv library. If they are part of libc this wont work. This is +the case with glibc >= 2.34. + *RESOLV_WRAPPER_HOSTS*:: This environment variable is used for faking DNS queries. It must point to a -- 2.34.1