summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2002-07-01 01:20:28 +0000
committerdougb <dougb@FreeBSD.org>2002-07-01 01:20:28 +0000
commit6c7d734ad5356ca0a26e4ac4a48b159367a32613 (patch)
treeaac3a8864bfcf09cca9408465b0649334b61d842 /contrib
parent67c9dec97554c34ae92f7d669f1c0de844fcf4c8 (diff)
downloadFreeBSD-src-6c7d734ad5356ca0a26e4ac4a48b159367a32613.zip
FreeBSD-src-6c7d734ad5356ca0a26e4ac4a48b159367a32613.tar.gz
Resolve conflicts, generally in favor of the vendor version.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bind/bin/named-xfer/named-xfer.c8
-rw-r--r--contrib/bind/bin/nslookup/commands.l28
-rw-r--r--contrib/bind/bin/nslookup/getinfo.c23
-rw-r--r--contrib/bind/bin/nslookup/main.c23
-rw-r--r--contrib/bind/doc/man/dig.116
-rw-r--r--contrib/bind/doc/man/host.166
-rw-r--r--contrib/bind/port/freebsd/include/port_before.h6
7 files changed, 91 insertions, 79 deletions
diff --git a/contrib/bind/bin/named-xfer/named-xfer.c b/contrib/bind/bin/named-xfer/named-xfer.c
index 6926e30..ea3ecc8 100644
--- a/contrib/bind/bin/named-xfer/named-xfer.c
+++ b/contrib/bind/bin/named-xfer/named-xfer.c
@@ -131,7 +131,7 @@ char copyright[] =
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91";
-static const char rcsid[] = "$Id: named-xfer.c,v 8.120 2002/01/29 06:54:52 marka Exp $";
+static const char rcsid[] = "$Id: named-xfer.c,v 8.121 2002/06/26 03:27:22 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -751,6 +751,7 @@ main(int argc, char *argv[]) {
default:
result = XFER_FAIL;
/* fall through */
+ case XFER_REFUSED:
case XFER_TIMEOUT:
case XFER_FAIL:
(void) unlink(tmpname);
@@ -1068,6 +1069,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
u_int32_t query_serial = serial_no;
int first_soa_printed;
struct in_addr z_axfr_src;
+ int refused = 0;
#ifdef DEBUG
if (debug) {
@@ -1631,6 +1633,7 @@ receive:
my_addr_text,
inet_ntoa(sin.sin_addr),
zp->z_origin);
+ refused = 1;
} else {
syslog(LOG_INFO,
"[%s] record too short from [%s], zone %s\n",
@@ -1913,6 +1916,7 @@ axfr_response:
my_addr_text,
inet_ntoa(sin.sin_addr),
zp->z_origin);
+ refused = 1;
} else {
syslog(LOG_INFO,
"[%s] record too short from [%s], zone %s\n",
@@ -1952,6 +1956,8 @@ axfr_response:
}
if (!error)
return (XFER_TIMEOUT);
+ if (refused)
+ return (XFER_REFUSED);
return (XFER_FAIL);
}
diff --git a/contrib/bind/bin/nslookup/commands.l b/contrib/bind/bin/nslookup/commands.l
index a23c44b..fd228a4 100644
--- a/contrib/bind/bin/nslookup/commands.l
+++ b/contrib/bind/bin/nslookup/commands.l
@@ -172,11 +172,11 @@ NAME [:A-Za-z0-9.*=_/-]
* 1 == use original server to find
* the new one.
*/
- SetDefaultServer(yytext, 0);
+ SetDefaultServer((char*)yytext, 0);
return(1);
}
^{WS}*lserver{WS}+{LET}{NAME}*{WS}*$ {
- SetDefaultServer(yytext, 1);
+ SetDefaultServer((char*)yytext, 1);
return(1);
}
^{WS}*exit{WS}*$ {
@@ -192,11 +192,11 @@ NAME [:A-Za-z0-9.*=_/-]
* 0 == output to stdout
* 1 == output to file
*/
- Finger(yytext, 1);
+ Finger((char*)yytext, 1);
return(1);
}
^{WS}*finger({WS}+{LET}{NAME}*)?{WS}*$ {
- Finger(yytext, 0);
+ Finger((char*)yytext, 0);
return(1);
}
^{WS}*ls{WS}+(("-a"|"-d"|"-h"|"-m"|"-s"){WS}+)?{LET}{NAME}*{WS}+>>?{WS}+{NAME}+{WS}*$ {
@@ -205,11 +205,11 @@ NAME [:A-Za-z0-9.*=_/-]
* 0 == output to stdout
* 1 == output to file
*/
- ListHosts(yytext, 1);
+ ListHosts((char*)yytext, 1);
return(1);
}
^{WS}*ls{WS}+(("-a"|"-d"|"-h"|"-m"|"-s"){WS}+)?{LET}{NAME}*{WS}*$ {
- ListHosts(yytext, 0);
+ ListHosts((char*)yytext, 0);
return(1);
}
^{WS}*ls{WS}+-t{WS}+({LET}{NAME}*{WS}+)?{LET}{NAME}*{WS}+>>?{WS}+{NAME}+{WS}*$ {
@@ -218,15 +218,15 @@ NAME [:A-Za-z0-9.*=_/-]
* 0 == output to stdout
* 1 == output to file
*/
- ListHostsByType(yytext, 1);
+ ListHostsByType((char*)yytext, 1);
return(1);
}
^{WS}*ls{WS}+-t{WS}+({LET}{NAME}*{WS}+)?{LET}{NAME}*{WS}*$ {
- ListHostsByType(yytext, 0);
+ ListHostsByType((char*)yytext, 0);
return(1);
}
^{WS}*set{WS}+{NAME}+{WS}*$ {
- SetOption(yytext);
+ SetOption((char*)yytext);
return(1);
}
^{WS}*help{WS}*$ {
@@ -244,11 +244,11 @@ NAME [:A-Za-z0-9.*=_/-]
* 0 == output to stdout
* 1 == output to file
*/
- LookupHost(yytext, 1);
+ LookupHost((char*)yytext, 1);
return(1);
}
^{WS}*{FLET}{NAME}*{WS}*$ {
- LookupHost(yytext, 0);
+ LookupHost((char*)yytext, 0);
return(1);
}
^{WS}*{FLET}{NAME}*{WS}+{LET}{NAME}*{WS}+>>?{WS}*{NAME}+{WS}*$ {
@@ -256,11 +256,11 @@ NAME [:A-Za-z0-9.*=_/-]
* 0 == output to stdout
* 1 == output to file
*/
- LookupHostWithServer(yytext, 1);
+ LookupHostWithServer((char*)yytext, 1);
return(1);
}
^{WS}*{FLET}{NAME}*{WS}+{LET}{NAME}*{WS}*$ {
- LookupHostWithServer(yytext, 0);
+ LookupHostWithServer((char*)yytext, 0);
return(1);
}
^{WS}*\n {
@@ -268,7 +268,7 @@ NAME [:A-Za-z0-9.*=_/-]
}
^.*\n {
printf("Unrecognized command: %s",
- yytext);
+ (char*)yytext);
return(1);
}
\n { ; }
diff --git a/contrib/bind/bin/nslookup/getinfo.c b/contrib/bind/bin/nslookup/getinfo.c
index a1c593c..0c1072e 100644
--- a/contrib/bind/bin/nslookup/getinfo.c
+++ b/contrib/bind/bin/nslookup/getinfo.c
@@ -54,7 +54,7 @@
#ifndef lint
static const char sccsid[] = "@(#)getinfo.c 5.26 (Berkeley) 3/21/91";
-static const char rcsid[] = "$Id: getinfo.c,v 8.23 2002/04/29 01:11:52 marka Exp $";
+static const char rcsid[] = "$Id: getinfo.c,v 8.27 2002/05/22 04:06:57 marka Exp $";
#endif /* not lint */
/*
@@ -142,16 +142,9 @@ typedef union {
*/
static int
-GetAnswer(nsAddrPtr, queryType, msg, msglen, iquery, hostPtr, isServer,
- merge)
- union res_sockaddr_union *nsAddrPtr;
- char *msg;
- int queryType;
- int msglen;
- Boolean iquery;
- register HostInfo *hostPtr;
- Boolean isServer;
- Boolean merge;
+GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
+ char *msg, int msglen, Boolean iquery, HostInfo *hostPtr,
+ Boolean isServer, Boolean merge)
{
register HEADER *headerPtr;
register const u_char *cp;
@@ -253,7 +246,8 @@ GetAnswer(nsAddrPtr, queryType, msg, msglen, iquery, hostPtr, isServer,
printf("Non-authoritative answer:\n");
}
- if (queryType != T_A && !(iquery && queryType == T_PTR)) {
+ if (queryType != T_A && queryType != T_AAAA && /* A6? */
+ !(iquery && queryType == T_PTR)) {
while (--ancount >= 0 && cp < eom) {
if ((cp = Print_rr(cp, (u_char *)&answer,
eom, stdout)) == NULL) {
@@ -360,7 +354,8 @@ GetAnswer(nsAddrPtr, queryType, msg, msglen, iquery, hostPtr, isServer,
}
}
- if ((queryType == T_A || queryType == T_PTR) && haveAnswer) {
+ if ((queryType == T_A || queryType == T_AAAA || queryType == T_PTR) &&
+ haveAnswer) {
/*
* Go through the alias and address lists and return them
@@ -540,7 +535,7 @@ GetAnswer(nsAddrPtr, queryType, msg, msglen, iquery, hostPtr, isServer,
*/
cp = res_skip((u_char*)&answer, 3, eom);
- if (queryType != T_A) {
+ if (queryType != T_A && queryType != T_AAAA) {
/*
* If we don't need to save the record, just print it.
*/
diff --git a/contrib/bind/bin/nslookup/main.c b/contrib/bind/bin/nslookup/main.c
index 384e3cd..5bce811 100644
--- a/contrib/bind/bin/nslookup/main.c
+++ b/contrib/bind/bin/nslookup/main.c
@@ -78,7 +78,7 @@ char copyright[] =
#ifndef lint
static const char sccsid[] = "@(#)main.c 5.42 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: main.c,v 8.22 2002/04/12 03:03:49 marka Exp $";
+static const char rcsid[] = "$Id: main.c,v 8.24 2002/05/26 03:12:20 marka Exp $";
#endif /* not lint */
/*
@@ -341,10 +341,21 @@ main(int argc, char **argv) {
} else {
result = GetHostInfoByAddr(&u[i], &u[i], defaultPtr);
if (result != SUCCESS) {
+ char t[80];
+ switch (u[i].sin.sin_family) {
+ case AF_INET:
+ inet_ntop(AF_INET, &u[i].sin.sin_addr, t, sizeof(t));
+ break;
+ case AF_INET6:
+ inet_ntop(AF_INET6, &u[i].sin6.sin6_addr, t, sizeof(t));
+ break;
+ default:
+ strcpy(t, "<UNKNOWN>");
+ break;
+ }
fprintf(stderr,
- "*** Can't find server name for address %s: %s\n",
- inet_ntoa(res.nsaddr_list[i].sin_addr),
- DecodeError(result));
+ "*** Can't find server name for address %s: %s\n",
+ t, DecodeError(result));
} else {
defaultAddr = u[i];
break;
@@ -693,7 +704,7 @@ DoLookup(host, servPtr, serverName)
* RFC1123 says we "SHOULD check the string syntactically for a
* dotted-decimal number before looking it up [...]" (p. 13).
*/
- if (queryType == T_A && IsAddr(host, &addr)) {
+ if ((queryType == T_A || queryType == T_AAAA) && IsAddr(host, &addr)) {
result = GetHostInfoByAddr(&servAddr, &addr, &curHostInfo);
} else {
if (queryType == T_PTR) {
@@ -711,7 +722,7 @@ DoLookup(host, servPtr, serverName)
* There's no need to print anything for other query types
* because the info has already been printed.
*/
- if (queryType == T_A) {
+ if (queryType == T_A || queryType == T_AAAA) {
curHostValid = TRUE;
PrintHostInfo(filePtr, "Name:", &curHostInfo);
}
diff --git a/contrib/bind/doc/man/dig.1 b/contrib/bind/doc/man/dig.1
index 3fb8bdf..e150b04 100644
--- a/contrib/bind/doc/man/dig.1
+++ b/contrib/bind/doc/man/dig.1
@@ -1,5 +1,5 @@
.\" $FreeBSD$
-.\" $Id: dig.1,v 8.8 2001/09/24 15:21:29 marka Exp $
+.\" $Id: dig.1,v 8.9 2002/06/18 01:53:43 marka Exp $
.\"
.\" ++Copyright++ 1993
.\" -
@@ -96,7 +96,7 @@ will take the form:
where:
.Bl -tag -width Fl
.It Ar server
-may be either a domain name or a dot-notation
+may be either a domain name or a raw (IPv4 / IPv6)
Internet address. If this optional field is omitted,
.Ic dig
will attempt to use the default name server for your machine.
@@ -145,7 +145,7 @@ See the
.Fl x
option (documented in the
.Sx OTHER OPTIONS
-subsection of this section) for convenient way to specify inverse address
+subsection of this section) for convenient way to specify reverse address
query.
.It Ar query-type
is the type of information (DNS query type) that
@@ -240,9 +240,15 @@ available (although not guaranteed to be useful):
.It Fl x Ar dot-notation-address
Convenient form to specify inverse address mapping.
Instead of
-.Dq Ic dig 32.0.9.128.in-addr.arpa ,
+.Dq Ic dig 32.0.9.28.in-addr.arpa ,
one can simply
-.Dq Ic dig -x 128.9.0.32 .
+.Dq Ic dig -x 28.9.0.32 .
+.It Fl x Ar IPv6-address
+Convenient form to specify inverse address mapping.
+Instead of
+.Dq Ic dig 1.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa ,
+one can simply
+.Dq Ic dig -x ::1 .
.It Fl f Ar file
File for
.Ic dig
diff --git a/contrib/bind/doc/man/host.1 b/contrib/bind/doc/man/host.1
index 91932c5..ae5736a 100644
--- a/contrib/bind/doc/man/host.1
+++ b/contrib/bind/doc/man/host.1
@@ -1,3 +1,4 @@
+.\" $FreeBSD$
.\" ++Copyright++ 1993
.\" -
.\" Copyright (c) 1993
@@ -50,9 +51,7 @@
.\" SOFTWARE.
.\" -
.\" --Copyright--
-.\" $Id: host.1,v 8.6 2001/08/10 00:14:47 cyarnell Exp $
-.\" $FreeBSD$
-.\"
+.\" $Id: host.1,v 8.7 2002/06/18 02:39:26 marka Exp $
.Dd December 15, 1994
.Dt HOST @CMD_EXT_U@
.Os BSD 4
@@ -61,9 +60,13 @@
.Nd look up host names using domain server
.Sh SYNOPSIS
.Nm host
-.Op Fl adlrwv
-.Op Fl c Ar class
+.Op Fl l
+.Op Fl v
+.Op Fl w
+.Op Fl r
+.Op Fl d
.Op Fl t Ar querytype
+.Op Fl a
.Ar host
.Op Ar server
.Sh DESCRIPTION
@@ -82,7 +85,7 @@ by the domain server.
The arguments can be either host names or host numbers. The program
first attempts to interpret them as host numbers. If this fails,
it will treat them as host names. A host number consists of
-four decimal numbers separated by dots, e.g. 128.6.4.194
+IPv4 dotted decimal quad (127.0.0.1) or IPv6 raw address (::1).
A host name consists of names separated by dots, e.g. topaz.rutgers.edu.
Unless the name ends in a dot, the local domain
is automatically tacked on the end. Thus, a Rutgers user can say
@@ -156,39 +159,23 @@ There are a number of options that can be used before the
host name. Most of these options are meaningful only to the
staff who have to maintain the domain database.
.Bl -tag -width Fl
-.It Fl a
-.Dq all ;
-this is equivalent to
-.Dq Fl v Fl t Cm any .
-.It Fl c Ar class
-The
-.Ar class
-to look for non-Internet data.
-.It Fl d
-Turn on debugging. Network transactions are shown in detail.
-.It Fl l
-List a complete domain; e.g.:
-.Pp
-.D1 Ic host -l rutgers.edu
-.Pp
-will give a listing of all hosts in the rutgers.edu domain. The
-.Dq Fl t
-option is used to filter what information is presented, as you
-would expect. The default is address information, which also
-include PTR and NS records. The command
-.Pp
-.D1 Ic host -l -v -t any rutgers.edu
-.Pp
-will give a complete download of the zone data for rutgers.edu,
-in the official master file format. (However the SOA record is
-listed twice, for arcane reasons.)
-.Pp
-.Sy NOTE:
-.Dq Fl l
-is implemented by
-doing a complete zone transfer and then filtering out the information
-that you have asked for. This command should be used only if it
-is absolutely necessary.
+.It Fl w
+This causes
+.Ic host
+to wait forever for a response. Normally
+it will time out after approximate one minute.
+.It Fl v
+Use "verbose" format for printout. This
+is the official domain master file format, which is documented
+in the man page for
+.Xr @INDOT@named @SYS_OPS_EXT@ .
+Without this option, output still follows
+this format in general terms, but some attempt is made to make it
+more intelligible to normal users. Without
+.Dq Fl v ,
+any "a", "mx", and "cname" records
+are written out as "has address", "mail is handled by", and
+"is a nickname for" (respectively), and TTL and class fields are not shown.
.It Fl r
Turn off recursion in the request.
This means that the name server will return only data it has in
@@ -206,6 +193,7 @@ to be looked up. The arguments are defined in the man page for
.Xr @INDOT@named @SYS_OPS_EXT@ .
Currently-supported types include:
.Dq Cm a ,
+.Dq Cm aaaa ,
.Dq Cm ns ,
.Dq Cm md ,
.Dq Cm mf ,
diff --git a/contrib/bind/port/freebsd/include/port_before.h b/contrib/bind/port/freebsd/include/port_before.h
index cdedbbd..a97e2ef 100644
--- a/contrib/bind/port/freebsd/include/port_before.h
+++ b/contrib/bind/port/freebsd/include/port_before.h
@@ -16,6 +16,7 @@
#define SETPWENT_VOID
#endif
+#include <sys/param.h>
#include <sys/types.h>
#define GROUP_R_RETURN struct group *
@@ -27,8 +28,13 @@
#define GROUP_R_ENT_ARGS void
#define GROUP_R_OK gptr
#define GROUP_R_BAD NULL
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 500030
#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, \
int *ngroups
+#else
+#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, \
+ int *ngroups
+#endif
#define HOST_R_RETURN struct hostent *
#define HOST_R_SET_RETURN void
OpenPOWER on IntegriCloud