summaryrefslogtreecommitdiff
path: root/net/host/patches
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2001-03-10 17:06:37 +0000
committerwiz <wiz@pkgsrc.org>2001-03-10 17:06:37 +0000
commit7953ca3b6480f58ba22f3815334ba2092cbb81f9 (patch)
tree435e9d03be6889534462f7979847abf88a799d08 /net/host/patches
parent02b9a46f56ba20537a38eb217046b73b3472f28b (diff)
downloadpkgsrc-7953ca3b6480f58ba22f3815334ba2092cbb81f9.tar.gz
host-991529 -- powerful replacement for host(1).
Package provided by Greg A. Woods in pkg/12056, modified by me.
Diffstat (limited to 'net/host/patches')
-rw-r--r--net/host/patches/patch-aa31
-rw-r--r--net/host/patches/patch-ab20
-rw-r--r--net/host/patches/patch-ac17
-rw-r--r--net/host/patches/patch-ad204
4 files changed, 272 insertions, 0 deletions
diff --git a/net/host/patches/patch-aa b/net/host/patches/patch-aa
new file mode 100644
index 00000000000..228b632b5c2
--- /dev/null
+++ b/net/host/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/03/10 17:06:37 wiz Exp $
+
+--- Makefile.orig Wed Mar 15 22:51:39 2000
++++ Makefile
+@@ -4,11 +4,13 @@
+ # Adapt the installation directories to your local standards.
+ # ----------------------------------------------------------------------
+
++PREFIX?= /usr/local
++
+ # This is where the host executable will go.
+-DESTBIN = /usr/local/bin
++DESTBIN = ${PREFIX}/bin
+
+ # This is where the host manual page will go.
+-DESTMAN = /usr/local/man
++DESTMAN = ${PREFIX}/man
+
+ BINDIR = $(DESTBIN)
+ MANDIR = $(DESTMAN)/man1
+@@ -38,7 +40,10 @@
+ SYSDEFS = -DNO_YP_LOOKUP
+ #endif
+
+ SYSDEFS =
++
++#if defined(NetBSD) && you have not removed support for $HOSTALIASES
++SYSDEFS = ${ALLOW_HOSTALIASES}
+
+ # ----------------------------------------------------------------------
+ # Configuration definitions.
diff --git a/net/host/patches/patch-ab b/net/host/patches/patch-ab
new file mode 100644
index 00000000000..93a080dd269
--- /dev/null
+++ b/net/host/patches/patch-ab
@@ -0,0 +1,20 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/03/10 17:06:37 wiz Exp $
+
+--- info.c.orig Mon Mar 27 12:59:11 2000
++++ info.c
+@@ -85,6 +85,7 @@
+ if (*cp == '.')
+ dot++;
+
++#ifdef ALLOW_HOSTALIASES
+ /*
+ * Check for aliases of single name.
+ * Note that the alias is supposed to be fully qualified.
+@@ -97,6 +98,7 @@
+ result = get_domaininfo(cp, (char *)NULL);
+ return(result);
+ }
++#endif
+
+ /*
+ * Trailing dot means absolute (fully qualified) address.
diff --git a/net/host/patches/patch-ac b/net/host/patches/patch-ac
new file mode 100644
index 00000000000..3c03008e4fe
--- /dev/null
+++ b/net/host/patches/patch-ac
@@ -0,0 +1,17 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/03/10 17:06:37 wiz Exp $
+
+--- mxlookup.orig Sun Jan 8 01:07:04 1995
++++ mxlookup
+@@ -26,10 +26,10 @@
+ # Setup environment.
+ # ----------------------------------------------------------------------
+
+ # This is where the ``host'' executable lives.
+-BINDIR=/usr/local/bin
++BINDIR=@PREFIX@/bin
+
+-PATH=${BINDIR}:/bin:/usr/bin:/usr/ucb ; export PATH
++PATH=${BINDIR}:/bin:/usr/bin ; export PATH
+
+ cmd=`basename $0`
+
diff --git a/net/host/patches/patch-ad b/net/host/patches/patch-ad
new file mode 100644
index 00000000000..15cc52dbbc9
--- /dev/null
+++ b/net/host/patches/patch-ad
@@ -0,0 +1,204 @@
+$NetBSD: patch-ad,v 1.1.1.1 2001/03/10 17:06:37 wiz Exp $
+
+--- rblookup.orig Wed Jan 27 01:50:22 1999
++++ rblookup
+@@ -12,8 +12,8 @@
+ # of the Mail Abuse Prevention System. See: http://maps.vix.com/rbl
+ #
+ # Syntax:
+-# rblookup hostname
+-# rblookup -i dottedquad
++# rblookup hostname ...
++# rblookup -i dottedquad ...
+ #
+ # Returns:
+ # zero if the given host was found on the blacklist.
+@@ -44,25 +44,72 @@
+ # Setup environment.
+ # ----------------------------------------------------------------------
+
+ # This is where the ``host'' executable lives.
+-BINDIR=/usr/local/bin
++BINDIR=@PREFIX@/bin
+
+-PATH=${BINDIR}:/bin:/usr/bin:/usr/ucb ; export PATH
++PATH=${BINDIR}:/bin:/usr/bin ; export PATH
+
+ cmd=`basename $0`
+
+-options="[-maps] [-orbs] [-i] [-v]"
+-usage="Usage: $cmd $options hostname"
++options="[-dul] [-maps] [-orbs] [-relays] [-i] [-v]"
++usage="Usage: $cmd $options hostname|IP# ..."
+
+ # ----------------------------------------------------------------------
+-# Configuration.
++# RBLs:
+ # ----------------------------------------------------------------------
+
+-MAPSROOT="rbl.maps.vix.com"
++# MAPS RBL: Mail Abuse Protection System Realtime Blackhole List
++# <URL:http://mail-abuse.org/rbl/>
++#
++# This listing is human-operated, and is one of the most popular
++# blacklists of spam-originating systems. Originally started by Paul
++# Vixie, this is the original "RBL" system.
++#
++MAPSROOT="blackholes.mail-abuse.org"
++ALLRBLS="${MAPSROOT} ${ALLRBLS}"
++
++# MAPS DUL: Mail Abuse Protection System Dial-up User List
++# <URL:http://mail-abuse.org/dul/>
++#
++# This list was started from a list compiled by "Afterburner" (the
++# head-honcho abuse guy at Erols Internet), and extended to be easily
++# added to over time. This service was originally called the ORCA
++# DUL, and was operated at "dul.orca.bc.ca". The MAPS project invited
++# Al Iverson, the then-current DUL maintainer, to host it on their
++# systems.
++#
++DULROOT="dialups.mail-abuse.org"
++ALLRBLS="${DULROOT} ${ALLRBLS}"
++
++# ORBS: Open Relay Behaviour-modification System
++# <URL:http://www.orbs.org/>
++#
++# This is an listing of IP addresses that have been submitted by spam
++# victims and others and have been automatically tested and proven to
++# be the output ports of SMTP servers that will transmit at least one
++# message to any system for anyone (an "open email relay").
++# Administrators of listed servers can request re-testing and
++# automated systems will remove those that have proven to close their
++# relays. Input points of multi-level relays can be submitted too,
++# but only the output point is listed in the DNS RBL.
++#
+ ORBSROOT="relays.orbs.org"
++ALLRBLS="${ORBSROOT} ${ALLRBLS}"
++
++# RSS: MAPS Relay Spam Stopper
++# <URL:http://mail-abuse.org/rss/>
++#
++# This is a list of e-mail relays which have been verified to have
++# been used to send spam. They supposedly have archives of the spam
++# they received through these relays. They do not list multi-level
++# relays (and thus miss a vast number of the actively exploited
++# systems out there -- I really hope they change this policy)!
++#
++RELAYSROOT="relays.mail-abuse.org"
++ALLRBLS="${RELAYSROOT} ${ALLRBLS}"
+
+ # ----------------------------------------------------------------------
+-# Exit codes from <sysexits.h>
++# Exit codes from <sysexits.h>, just in case we are called from a mailer
+ # ----------------------------------------------------------------------
+
+ EX_OK=0
+@@ -85,8 +134,11 @@
+ # ----------------------------------------------------------------------
+
+ verbose=
+-reverse=
+-orbs=
++reverse=false
++orbs=false
++dul=false
++maps=false
++relays=false
+
+ skip=
+ for i
+@@ -95,7 +147,9 @@
+
+ case "$i" in
+ -orbs) orbs=true ;;
+- -maps) orbs= ;;
++ -dul) dul=true ;;
++ -maps) maps=true ;;
++ -relays) relays=true ;;
+ -i) reverse=true ;;
+ -v) verbose="-v" ;;
+ -d) exec=echo ;;
+@@ -105,28 +159,10 @@
+ shift
+ done
+
+-# ----------------------------------------------------------------------
+-# Process arguments.
+-# ----------------------------------------------------------------------
+-
+-name="$1"
+-
+-[ "X$name" = "X" ] && fatal "$usage"
+-
+-# Remove trailing dots.
+-name=`echo $name | sed 's/\.*$//'`
+-
+-if [ $reverse ]
+-then
+- # Assume this is already a dotted quad.
+- addresslist="$name"
+-else
+- # Try to resolve domain name into dotted quad.
+- addresslist=`host "$name" | awk '$2 == "A" {print $3}'`
+-fi
++[ $# -lt 1 ] && fatal "$usage"
+
+ # ----------------------------------------------------------------------
+-# Auxiliary routines.
++# More routines.
+ # ----------------------------------------------------------------------
+
+ invalid ()
+@@ -180,20 +216,42 @@
+
+ exitstat=$EX_UNAVAILABLE
+
+-for address in $addresslist
++for name in ${1+$@}
+ do
++ # Remove trailing dots.
++ name=`echo $name | sed 's/\.*$//'`
++
++ if $reverse
++ then
++ # Assume this is already a dotted quad.
++ address="$name"
++ else
++ # Try to resolve domain name into dotted quad.
++ address=`host "$name" | awk '$2 == "A" {print $3}'`
++ fi
++
+ # Swap dotted quad labels.
+ invert
+
+- # Construct proper name in map.
+- [ $orbs ] && map="$ORBSROOT" || map="$MAPSROOT"
+- name="$reversed.$map"
+-
+- echo "--- $name ---"
+- $exec host $verbose -t A $name
+- found=$?
+- [ $found -eq $EX_OK ] && exitstat=$EX_OK
+- [ $found -eq $EX_OK ] && $exec host $verbose -t TXT $name
++ rbllist=""
++ $orbs && rbllist="$ORBSROOT $rbllist"
++ $dul && rbllist="$DULROOT $rbllist"
++ $maps && rbllist="$MAPSROOT $rbllist"
++ $relays && rbllist="$RELAYSROOT $rbllist"
++
++ [ -z "$rbllist" ] && rbllist="$ALLRBLS"
++
++ for rbl in $rbllist
++ do
++ # Construct proper name in map.
++ name="$reversed.$rbl"
++
++ echo "--- $name ---"
++ $exec host $verbose -t A $name
++ found=$?
++ [ $found -eq $EX_OK ] && exitstat=$EX_OK
++ [ $found -eq $EX_OK ] && $exec host $verbose -t TXT $name
++ done
+ done
+
+ exit $exitstat