summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-09-23 05:15:28 +0000
committerobrien <obrien@FreeBSD.org>1999-09-23 05:15:28 +0000
commit525520fd05daace78c0d8621f082ede8a143247a (patch)
treea55334da1b6c0a225afc91fd2529ee6915825bc9 /contrib
parent422815db966fe7dc38dfc5df2be5e83d5ea9f48c (diff)
downloadFreeBSD-src-525520fd05daace78c0d8621f082ede8a143247a.zip
FreeBSD-src-525520fd05daace78c0d8621f082ede8a143247a.tar.gz
Virgin import of AMD (am-utils) v6.0.2s2
Diffstat (limited to 'contrib')
-rw-r--r--contrib/amd/AUTHORS4
-rw-r--r--contrib/amd/BUGS3
-rw-r--r--contrib/amd/ChangeLog69
-rw-r--r--contrib/amd/INSTALL1
-rw-r--r--contrib/amd/MIRRORS8
-rw-r--r--contrib/amd/doc/am-utils.texi4
-rw-r--r--contrib/amd/doc/stamp-vti6
-rw-r--r--contrib/amd/doc/version.texi6
-rw-r--r--contrib/amd/include/am_defs.h6
-rw-r--r--contrib/amd/libamu/mount_fs.c31
-rw-r--r--contrib/amd/libamu/xutil.c6
-rwxr-xr-xcontrib/amd/scripts/expn.in159
12 files changed, 201 insertions, 102 deletions
diff --git a/contrib/amd/AUTHORS b/contrib/amd/AUTHORS
index ee692d8..c6b61ee 100644
--- a/contrib/amd/AUTHORS
+++ b/contrib/amd/AUTHORS
@@ -217,6 +217,8 @@ April 20, 1998: allow arbitrary number of interfaces in wire listing.
September 4, 1998: bug fix to avoid overrunning hostname buffer, and minor
amd.conf man page typo correction.
+September 22, 1999: use more secure vsnprintf in real_plog().
+
* Danny Rathjens <dkr@cs.fiu.edu>
October 29, 1998: swap arguments to kill(2) in amd.c.
@@ -245,6 +247,8 @@ and more fixes. Numerous IP packet security fixes.
March 16, 1999: documentation typos. new cdfs options. ufs structure
detection for bsdi4.
+September 17, 1999: fixes to expn.
+
* Paul Balyoz <pbalyoz@sedona.ch.intel.com>
March 26, 1999: ensure lostaltmail displays Y2K compliant dates.
diff --git a/contrib/amd/BUGS b/contrib/amd/BUGS
index bdf6cde..797eb26 100644
--- a/contrib/amd/BUGS
+++ b/contrib/amd/BUGS
@@ -17,6 +17,9 @@ descriptors and hangs. Am-utils circumvents this by using its own version
of yp_all which uses udp and iterats over NIS maps. The latter isn't as
reliable as yp_all() which uses TCP, but it is better than hanging.
+(I have some reports that older version of hpux-9, with older libc, also
+leak file descriptors.)
+
(2) alpha-unknown-linux-gnu (RedHat Linux 4.2)
diff --git a/contrib/amd/ChangeLog b/contrib/amd/ChangeLog
index f40e52e..7c088f1 100644
--- a/contrib/amd/ChangeLog
+++ b/contrib/amd/ChangeLog
@@ -1,3 +1,72 @@
+1999-09-22 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.2s2
+
+ * aux/configure.in: bumped library version-info to 3:2:1, since
+ some libamu code got changed.
+
+ * libamu/xutil.c (real_plog): use vsnprintf, not vsprintf, which
+ is better and more secure. Fix from "David O'Brien"
+ <obrien@NUXI.com>.
+
+ * aux/configure.in: check for vsnprintf.
+
+1999-09-21 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/macros/linux_headers.m4: use AC_MSG_ERROR.
+
+ * aux/macros/opt_{cppflags,ldflags,libs,amu_cflags}.m4: the ARG is
+ not optional. Make sure ARG is supplied else flag an error.
+
+1999-09-18 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * minor port i386-unknown-freebsdelf3.3
+
+ * released snapshot am-utils-6.0.2s1
+
+1999-09-17 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/configure.in (AC_CHECK_FUNCS): check for getitimer().
+
+ * include/am_defs.h: extern definition for getitimer().
+
+ * aux/configure.in: use AC_CHECK_EXTERNS. Look for getitimer()
+ extern.
+
+ * aux/macros/check_extern.m4: define a simple AC_CHECK_EXTERNS
+ that calls AC_CHECK_EXTERN in a loop. This saves repeated code in
+ configure.
+
+ * aux/macros/type_auth_create_gidlist.m4: AIX 4.x systems use
+ 'int' as the 5th arg to authunix_create().
+
+ * aux/macros/type_recvfrom_fromlen.m4: all AIX 4.x systems use a
+ size_t for the 6th arg of recvfrom().
+
+ * aux/macros/os_cflags.m4: define _XOPEN_EXTENDED_SOURCE for
+ aix4.x systems.
+
+ * libamu/mount_fs.c (print_nfs_args): cast some values to int, to
+ avoid gcc -Wall errors.
+
+ * scripts/expn.in: use sockaddr_in(), not pack() to correctly fill
+ in a struct sockaddr_in. On Solaris x86 hosts, using pack()
+ results in byte-misaligned values. Bug fix from Jeffrey C Honig
+ <jch@BSDI.COM>.
+
+ * libamu/mount_fs.c (compute_automounter_mount_flags): turn on
+ automntfs (ignore on bsdi-4.1) flag.
+ (compute_automounter_nfs_args): ditto.
+
+ * aux/acconfig.h: add new flag for automntfs (ignore)
+
+ * aux/configure.in: check for new automntfs flag (bsdi-4.1).
+
+1999-09-14 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * MIRRORS: added new site in Germany. Updated status of umn.edu
+ and ferginc.com, who may no longer be mirroring am-utils.
+
1999-09-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
*******************************************************************
diff --git a/contrib/amd/INSTALL b/contrib/amd/INSTALL
index 9a94afa..3ea5b57 100644
--- a/contrib/amd/INSTALL
+++ b/contrib/amd/INSTALL
@@ -35,6 +35,7 @@ i386-unknown-freebsd3.0 ezk ezk ezk ezk
i386-unknown-freebsdelf3.0 ezk ezk ezk ezk
i386-unknown-freebsdelf3.1 ezk ezk ezk ezk
i386-unknown-freebsdelf3.2 ezk ezk ezk ezk
+i386-unknown-freebsdelf3.3 ezk ezk ezk ezk
i386-unknown-freebsdelf4.0 ezk ezk ezk ezk
i386-unknown-netbsd1.2.1 ezk ezk ezk ezk
i386-unknown-netbsd1.3 ezk ezk ezk ezk
diff --git a/contrib/amd/MIRRORS b/contrib/amd/MIRRORS
index 07e33c4..f1f163e 100644
--- a/contrib/amd/MIRRORS
+++ b/contrib/amd/MIRRORS
@@ -12,11 +12,12 @@ U.S.A:
ftp://shekel.mcl.cs.columbia.edu/pub/am-utils
Maintainer: ezk@cs.columbia.edu
Minnesota:
- ftp://ftp.cs.umn.edu/pub/AMD
+ ftp://ftp.cs.umn.edu/pub/am-utils
Maintainer: dokas@cs.umn.edu
Virginia (Newport News):
- ftp://www.ferginc.com/pub/unix/am-utils
+ ftp://ftp.ferginc.com/pub/unix/am-utils
Maintainer: Branson.Matheson@FergInc.com
+ Avoid for now: empty directory
Ohio (Kent State University):
ftp://info.mcs.kent.edu/pub/am-utils
Maintainer: root@mcs.kent.edu
@@ -25,6 +26,9 @@ Europe:
Germany:
ftp://ftp.fu-berlin.de/pub/unix/network/am-utils
Maintainer: ftp-adm@ftp.fu-berlin.de
+ Germany:
+ ftp://ftp.tu-darmstadt.de/pub/networking/filesystems/am-utils/
+ Maintainer: networking@ftp.tu-darmstadt.de
Sweden:
ftp://ftp.sunet.se/pub/unix/admin/am-utils
Maintainer: archive@ftp.sunet.se
diff --git a/contrib/amd/doc/am-utils.texi b/contrib/amd/doc/am-utils.texi
index f1d6f26..a4950ab 100644
--- a/contrib/amd/doc/am-utils.texi
+++ b/contrib/amd/doc/am-utils.texi
@@ -805,6 +805,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-unknown-freebsdelf3.3}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-unknown-freebsdelf4.0}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
diff --git a/contrib/amd/doc/stamp-vti b/contrib/amd/doc/stamp-vti
index 718ae23..61cef7a 100644
--- a/contrib/amd/doc/stamp-vti
+++ b/contrib/amd/doc/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 8 September 1999
-@set EDITION 6.0.1
-@set VERSION 6.0.1
+@set UPDATED 18 September 1999
+@set EDITION 6.0.2s2
+@set VERSION 6.0.2s2
diff --git a/contrib/amd/doc/version.texi b/contrib/amd/doc/version.texi
index 718ae23..61cef7a 100644
--- a/contrib/amd/doc/version.texi
+++ b/contrib/amd/doc/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 8 September 1999
-@set EDITION 6.0.1
-@set VERSION 6.0.1
+@set UPDATED 18 September 1999
+@set EDITION 6.0.2s2
+@set VERSION 6.0.2s2
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
index cc8035f..ba587e6 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_defs.h,v 1.10 1999/08/22 05:12:54 ezk Exp $
+ * $Id: am_defs.h,v 1.11 1999/09/18 08:38:05 ezk Exp $
*
*/
@@ -1341,6 +1341,10 @@ extern caddr_t sbrk(int incr);
extern int seteuid(uid_t euid);
#endif /* not defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID) */
+#if defined(HAVE_SETITIMER) && !defined(HAVE_EXTERN_SETITIMER)
+extern int setitimer(int, struct itimerval *, struct itimerval *);
+#endif /* defined(HAVE_SETITIMER) && !defined(HAVE_EXTERN_SETITIMER) */
+
#ifndef HAVE_EXTERN_STRCASECMP
/*
* define this extern even if function does not exist, for it will
diff --git a/contrib/amd/libamu/mount_fs.c b/contrib/amd/libamu/mount_fs.c
index 3556f8e..eb9f8b1 100644
--- a/contrib/amd/libamu/mount_fs.c
+++ b/contrib/amd/libamu/mount_fs.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mount_fs.c,v 1.7 1999/08/22 21:12:33 ezk Exp $
+ * $Id: mount_fs.c,v 1.8 1999/09/18 08:38:06 ezk Exp $
*
*/
@@ -156,6 +156,9 @@ compute_automounter_mount_flags(mntent_t *mntp)
#ifdef MNT2_GEN_OPT_IGNORE
flags |= MNT2_GEN_OPT_IGNORE;
#endif /* not MNT2_GEN_OPT_IGNORE */
+#ifdef MNT2_GEN_OPT_AUTOMNTFS
+ flags |= MNT2_GEN_OPT_AUTOMNTFS;
+#endif /* not MNT2_GEN_OPT_AUTOMNTFS */
return flags;
}
@@ -728,7 +731,8 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp)
#endif /* MNT2_NFS_OPT_SYMTTL */
/*
- * This completes the flags for the HIDE_MOUNT_TYPE code above.
+ * This completes the flags for the HIDE_MOUNT_TYPE code in the
+ * mount_amfs_toplvl() function in amd/amfs_toplvl.c.
* Some systems don't have a mount type, but a mount flag.
*/
#ifdef MNT2_NFS_OPT_AUTO
@@ -737,6 +741,9 @@ compute_automounter_nfs_args(nfs_args_t *nap, mntent_t *mntp)
#ifdef MNT2_NFS_OPT_IGNORE
nap->flags |= MNT2_NFS_OPT_IGNORE;
#endif /* MNT2_NFS_OPT_IGNORE */
+#ifdef MNT2_GEN_OPT_AUTOMNTFS
+ nap->flags |= MNT2_GEN_OPT_AUTOMNTFS;
+#endif /* not MNT2_GEN_OPT_AUTOMNTFS */
#ifdef MNT2_NFS_OPT_DUMBTIMR
/*
@@ -888,27 +895,27 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version)
plog(XLOG_DEBUG, "NA->sotype = %d", nap->sotype);
#endif /* HAVE_FIELD_NFS_ARGS_T_SOTYPE */
#ifdef HAVE_FIELD_NFS_ARGS_T_PROTO
- plog(XLOG_DEBUG, "NA->proto = %d", nap->proto);
+ plog(XLOG_DEBUG, "NA->proto = %d", (int) nap->proto);
#endif /* HAVE_FIELD_NFS_ARGS_T_PROTO */
#ifdef HAVE_FIELD_NFS_ARGS_T_VERSION
plog(XLOG_DEBUG, "NA->version = %d", nap->version);
#endif /* HAVE_FIELD_NFS_ARGS_T_VERSION */
- plog(XLOG_DEBUG, "NA->flags = 0x%x", nap->flags);
+ plog(XLOG_DEBUG, "NA->flags = 0x%x", (int) nap->flags);
- plog(XLOG_DEBUG, "NA->rsize = %d", nap->rsize);
- plog(XLOG_DEBUG, "NA->wsize = %d", nap->wsize);
+ plog(XLOG_DEBUG, "NA->rsize = %d", (int) nap->rsize);
+ plog(XLOG_DEBUG, "NA->wsize = %d", (int) nap->wsize);
#ifdef HAVE_FIELD_NFS_ARGS_T_BSIZE
plog(XLOG_DEBUG, "NA->bsize = %d", nap->bsize);
#endif /* HAVE_FIELD_NFS_ARGS_T_BSIZE */
- plog(XLOG_DEBUG, "NA->timeo = %d", nap->timeo);
- plog(XLOG_DEBUG, "NA->retrans = %d", nap->retrans);
+ plog(XLOG_DEBUG, "NA->timeo = %d", (int) nap->timeo);
+ plog(XLOG_DEBUG, "NA->retrans = %d", (int) nap->retrans);
#ifdef HAVE_FIELD_NFS_ARGS_T_ACREGMIN
- plog(XLOG_DEBUG, "NA->acregmin = %d", nap->acregmin);
- plog(XLOG_DEBUG, "NA->acregmax = %d", nap->acregmax);
- plog(XLOG_DEBUG, "NA->acdirmin = %d", nap->acdirmin);
- plog(XLOG_DEBUG, "NA->acdirmax = %d", nap->acdirmax);
+ plog(XLOG_DEBUG, "NA->acregmin = %d", (int) nap->acregmin);
+ plog(XLOG_DEBUG, "NA->acregmax = %d", (int) nap->acregmax);
+ plog(XLOG_DEBUG, "NA->acdirmin = %d", (int) nap->acdirmin);
+ plog(XLOG_DEBUG, "NA->acdirmax = %d", (int) nap->acdirmax);
#endif /* HAVE_FIELD_NFS_ARGS_T_ACREGMIN */
#ifdef MNTTAB_OPT_SYMTTL
plog(XLOG_DEBUG, "NA->symttl = %d", nap->symttl);
diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c
index 5ba4938..bd1bcf5 100644
--- a/contrib/amd/libamu/xutil.c
+++ b/contrib/amd/libamu/xutil.c
@@ -422,13 +422,17 @@ real_plog(int lvl, char *fmt, va_list vargs)
expand_error(fmt, efmt, 1024);
+#ifdef HAVE_VSNPRINTF
+ vsnprintf(ptr, 1024, efmt, vargs);
+#else /* not HAVE_VSNPRINTF */
/*
* XXX: ptr is 1024 bytes long. It is possible to write into it
* more than 1024 bytes, if efmt is already large, and vargs expand
- * as well.
+ * as well. This is not as safe as using vsnprintf().
*/
vsprintf(ptr, efmt, vargs);
msg[1023] = '\0'; /* null terminate, to be sure */
+#endif /* not HAVE_VSNPRINTF */
ptr += strlen(ptr);
if (ptr[-1] == '\n')
diff --git a/contrib/amd/scripts/expn.in b/contrib/amd/scripts/expn.in
index 5bd4200..de48f8d 100755
--- a/contrib/amd/scripts/expn.in
+++ b/contrib/amd/scripts/expn.in
@@ -11,12 +11,11 @@
use Socket; # perl 5
$AF_INET = &AF_INET;
$SOCK_STREAM = &SOCK_STREAM;
-$sockaddr = 'S n a4 x8';
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /src/cvsroot/am-utils-6.0/scripts/expn.in,v 1.1.1.1 1998/11/05 02:04:57 ezk Exp $
+# $Header: /src/cvsroot/am-utils-6.0/scripts/expn.in,v 1.2 1999/09/18 08:38:07 ezk Exp $
# TODO:
# less magic should apply to command-line addresses
@@ -88,7 +87,7 @@ $sockaddr = 'S n a4 x8';
# $names{"$users[0] *** $server"} : the 'name' associated with the address
# $mxbacktrace{"$users[0] *** $server"} : record of mx expansion
# $mx_secondary{$server} : other mx relays at the same priority
-# $domainify_fallback{"$users[0] *** $server"} : alternative names to try
+# $domainify_fallback{"$users[0] *** $server"} : alternative names to try
# instead of $server if $server doesn't work
# $temporary_redirect{"$users[0] *** $server"} : when trying alternates,
# temporarily channel all tries along current path
@@ -150,7 +149,7 @@ $0 = "$av0 - building local socket";
($name,$aliases,$proto) = getprotobyname('tcp');
($name,$aliases,$port) = getservbyname($port,'tcp')
unless $port =~ /^\d+/;
-$this = pack($sockaddr, &AF_INET, 0, $thisaddr);
+$this = sockaddr_in(0, $thisaddr);
HOST:
while (@hosts) {
@@ -177,14 +176,14 @@ while (@hosts) {
&mxlookup(1,$server,"$server: could not resolve name",*users);
next HOST;
}
-
+
# get a connection, or look for an mx
$0 = "$av0 - socket to $server";
- $that = pack($sockaddr, &AF_INET, $port, $thataddr);
+ $that = sockaddr_in($port, $thataddr);
socket(S, &AF_INET, &SOCK_STREAM, $proto)
|| die "socket: $!";
$0 = "$av0 - bind to $server";
- bind(S, $this)
+ bind(S, $this)
|| die "bind $hostname,0: $!";
$0 = "$av0 - connect to $server";
print "debug = $debug server = $server\n" if $debug > 8;
@@ -231,7 +230,7 @@ while (@hosts) {
&alarm("greeting with $server",'');
}
alarm(0);
-
+
# if this causes problems, remove it
$0 = "$av0 - sending helo to $server";
&alarm("sending helo to $server","");
@@ -254,7 +253,7 @@ while (@hosts) {
print &compact($u,$server)." ->\n" if ($verbose && ! $valid);
if ($valid) {
#
- # when running with -a, we delay taking any action
+ # when running with -a, we delay taking any action
# on the results of our query until we have looked
# at the complete output. @toFinal stores expansions
# that will be final if we take them. @toExpn stores
@@ -304,11 +303,11 @@ while (@hosts) {
}
} else {
$newmxhost = &mx($newhost,$newaddr);
- print "$newmxhost = &mx($newhost)\n"
+ print "$newmxhost = &mx($newhost)\n"
if ($debug && $newhost ne $newmxhost);
$0 = "$av0 - parsing $newaddr [@$newmxhost]";
print "levels = $levels, level{$u *** $server} = ".$level{"$u *** $server"}."\n" if ($debug > 1);
- # If the new server is the current one,
+ # If the new server is the current one,
# it would have expanded things for us
# if it could have. Mx records must be
# followed to compare server names.
@@ -337,7 +336,7 @@ while (@hosts) {
# 550 is a known code... Should the be
# included in -a output? Might be a bug
# here. Does it matter? Can assume that
- # there won't be UNKNOWN USER responses
+ # there won't be UNKNOWN USER responses
# mixed with valid users?
if ($s =~ /^(550)([- ])/) {
if ($valid) {
@@ -347,8 +346,8 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
- # 553 is a known code...
+ }
+ # 553 is a known code...
if ($s =~ /^(553)([- ])/) {
if ($valid) {
print STDERR "\@$server:$u ($oldname) USER AMBIGUOUS\n";
@@ -357,8 +356,8 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
- # 252 is a known code...
+ }
+ # 252 is a known code...
if ($s =~ /^(252)([- ])/) {
if ($valid) {
print STDERR "\@$server:$u ($oldname) REFUSED TO VRFY\n";
@@ -367,7 +366,7 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
+ }
&giveup('',"$server: did not grok '$s'",$u);
last USER;
}
@@ -467,7 +466,7 @@ sub giveup
#
# This routine is used only within &giveup. It checks to
# see if we really have to giveup or if there is a second
-# chance because we did something before that can be
+# chance because we did something before that can be
# backtracked.
#
# %fallback{"$user *** $host"} tracks what is able to fallback
@@ -491,7 +490,7 @@ sub try_fallback
}
print "U: $user H: $host\n";
}
-
+
$us = "$user *** $host";
if (defined $fellback{$us}) {
#
@@ -539,7 +538,7 @@ sub try_fallback
delete $fall_table{$ft};
}
if (defined $create_host_backtrack{$us}) {
- $create_host_backtrack{"$user *** $newhost"}
+ $create_host_backtrack{"$user *** $newhost"}
= $create_host_backtrack{$us};
}
$fellback{"$user *** $newhost"} = $oldhost;
@@ -619,7 +618,7 @@ sub expn_vrfy
@ret = ("",$s);
push(@ret,&read_response($2,$debug));
return (@ret);
- }
+ }
if ($1 == 551 || $1 == 251) {
$code = $1;
@ret = ("",$s);
@@ -645,7 +644,7 @@ sub expn_vrfy
return @ret;
}
# sometimes the old parse routine (now parse2) didn't
-# reject funky addresses.
+# reject funky addresses.
sub parse
{
local($oldaddr,$server,$oldname,$one_to_one) = @_;
@@ -658,9 +657,9 @@ sub parse
}
# returns ($new_smtp_server,$new_address,$new_name)
-# given a response from a SMTP server ($newaddr), the
+# given a response from a SMTP server ($newaddr), the
# current host ($server), the old "name" and a flag that
-# indicates if it is being called during the initial
+# indicates if it is being called during the initial
# command line parsing ($parsing_args)
sub parse2
{
@@ -763,7 +762,7 @@ sub trim
return(@r);
}
# using the host part of an address, and the server name, add the
-# servers' domain to the address if it doesn't already have a
+# servers' domain to the address if it doesn't already have a
# domain. Since this sometimes fails, save a back reference so
# it can be unrolled.
sub domainify
@@ -771,7 +770,7 @@ sub domainify
local($host,$domain_host,$u) = @_;
local($domain,$newhost);
- # cut of trailing dots
+ # cut of trailing dots
$host =~ s/\.$//;
$domain_host =~ s/\.$//;
@@ -783,23 +782,23 @@ sub domainify
return $host;
}
- #
- # There are several weird situtations that need to be
+ #
+ # There are several weird situtations that need to be
# accounted for. They have to do with domain relay hosts.
#
- # Examples:
+ # Examples:
# host server "right answer"
- #
+ #
# shiva.cs cs.berkeley.edu shiva.cs.berkeley.edu
# shiva cs.berkeley.edu shiva.cs.berekley.edu
# cumulus reed.edu @reed.edu:cumulus.uucp
# tiberius tc.cornell.edu tiberius.tc.cornell.edu
#
- # The first try must always be to cut the domain part out of
+ # The first try must always be to cut the domain part out of
# the server and tack it onto the host.
#
# A reasonable second try is to tack the whole server part onto
- # the host and for each possible repeated element, eliminate
+ # the host and for each possible repeated element, eliminate
# just that part.
#
# These extra "guesses" get put into the %domainify_fallback
@@ -809,7 +808,7 @@ sub domainify
local(%fallback);
- local($long);
+ local($long);
$long = "$host $domain_host";
$long =~ tr/A-Z/a-z/;
print "long = $long\n" if $debug;
@@ -854,7 +853,7 @@ sub domainify
$domainify_fallback{"$u *** $newhost"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback;
if ($debug) {
print "fallback = ";
- print $domainify_fallback{"$u *** $newhost"}
+ print $domainify_fallback{"$u *** $newhost"}
if defined($domainify_fallback{"$u *** $newhost"});
print "\n";
}
@@ -911,7 +910,7 @@ sub ps
print S "$p\n";
}
# return case-adjusted name for a host (for comparison purposes)
-sub trhost
+sub trhost
{
# treat foo.bar as an alias for Foo.BAR
local($host) = @_;
@@ -990,7 +989,7 @@ sub mx
# look up mx records with the name server.
# re-queue expansion requests if possible
# optionally give up on this host.
-sub mxlookup
+sub mxlookup
{
local($lastchance,$server,$giveup,*users) = @_;
local(*T);
@@ -1033,18 +1032,18 @@ sub mxlookup
}
if (/Non-existent domain/) {
#
- # These addresss are hosed. Kaput! Dead!
+ # These addresss are hosed. Kaput! Dead!
# However, if we created the address in the
- # first place then there is a chance of
+ # first place then there is a chance of
# salvation.
#
- 1 while(<NSLOOKUP>);
+ 1 while(<NSLOOKUP>);
close(NSLOOKUP);
return 0 unless $lastchance;
&giveup('domainify',"$server: Non-existent domain",undef,1);
- return 0;
+ return 0;
}
-
+
}
close(NSLOOKUP);
unlink("/tmp/expn$$");
@@ -1082,7 +1081,7 @@ sub mxlookup
return 1;
}
# if mx expansion did not help to resolve an address
-# (ie: foo@bar became @baz:foo@bar, then undo the
+# (ie: foo@bar became @baz:foo@bar, then undo the
# expansion).
# this is only used by &final
sub mxunroll
@@ -1092,10 +1091,10 @@ sub mxunroll
print "looking for mxbacktrace{$addr *** $host}\n"
if ($debug > 1);
while (defined $mxbacktrace{"$addr *** $host"}) {
- print "Unrolling MX expnasion: \@$host:$addr -> "
+ print "Unrolling MX expnasion: \@$host:$addr -> "
if ($debug || $verbose);
$host = $mxbacktrace{"$addr *** $host"};
- print "\@$host:$addr\n"
+ print "\@$host:$addr\n"
if ($debug || $verbose);
$r = 1;
}
@@ -1104,7 +1103,7 @@ sub mxunroll
if ($host =~ /\./);
return 0;
}
-# register a completed expnasion. Make the final address as
+# register a completed expnasion. Make the final address as
# simple as possible.
sub final
{
@@ -1114,7 +1113,7 @@ sub final
local($au,$ah);
if ($error =~ /Non-existent domain/) {
- #
+ #
# If we created the domain, then let's undo the
# damage...
#
@@ -1126,7 +1125,7 @@ sub final
}
$error = "$host: could not locate";
} else {
- #
+ #
# If we only want valid addresses, toss out
# bad host names.
#
@@ -1161,17 +1160,17 @@ sub final
# host part has a . in it - foo.bar
($hb, $hr) = ($1, $2);
if ($addr =~ /\@([^\.\@]+)$/ && ($1 eq $hb)) {
- # addr part has not .
+ # addr part has not .
# and matches beginning of
- # host part -- tack on a
+ # host part -- tack on a
# domain name.
$addr .= $hr;
} else {
- &mxunroll(*host,*addr)
+ &mxunroll(*host,*addr)
&& redo MXUNWIND;
}
} else {
- &mxunroll(*host,*addr)
+ &mxunroll(*host,*addr)
&& redo MXUNWIND;
}
} else {
@@ -1231,13 +1230,13 @@ $flag_1;
%already_domainify_fellback;
%already_mx_fellback;
&handle_alarm;
-################### BEGIN PERL/TROFF TRANSITION
-.00 ;
+################### BEGIN PERL/TROFF TRANSITION
+.00 ;
'di
.nr nl 0-1
.nr % 0
-.\\"'; __END__
+.\\"'; __END__
.\" ############## END PERL/TROFF TRANSITION
.TH EXPN 1 "March 11, 1993"
.AT 3
@@ -1256,25 +1255,25 @@ expn \- recursively expand mail aliases
.B expn
will use the SMTP
.B expn
-and
+and
.B vrfy
-commands to expand mail aliases.
+commands to expand mail aliases.
It will first look up the addresses you provide on the command line.
-If those expand into addresses on other systems, it will
-connect to the other systems and expand again. It will keep
+If those expand into addresses on other systems, it will
+connect to the other systems and expand again. It will keep
doing this until no further expansion is possible.
.SH OPTIONS
-The default output of
+The default output of
.B expn
can contain many lines which are not valid
-email addresses. With the
+email addresses. With the
.I -aa
flag, only expansions that result in legal addresses
are used. Since many mailing lists have an illegal
address or two, the single
.IR -a ,
address, flag specifies that a few illegal addresses can
-be mixed into the results. More
+be mixed into the results. More
.I -a
flags vary the ratio. Read the source to track down
the formula. With the
@@ -1282,13 +1281,13 @@ the formula. With the
option, you should be able to construct a new mailing
list out of an existing one.
.LP
-If you wish to limit the number of levels deep that
+If you wish to limit the number of levels deep that
.B expn
will recurse as it traces addresses, use the
.I -1
-option. For each
+option. For each
.I -1
-another level will be traversed. So,
+another level will be traversed. So,
.I -111
will traverse no more than three levels deep.
.LP
@@ -1297,21 +1296,21 @@ The normal mode of operation for
is to do all of its work silently.
The following options make it more verbose.
It is not necessary to make it verbose to see what it is
-doing because as it works, it changes its
+doing because as it works, it changes its
.BR argv [0]
variable to reflect its current activity.
-To see how it is expanding things, the
+To see how it is expanding things, the
.IR -v ,
-verbose, flag will cause
-.B expn
+verbose, flag will cause
+.B expn
to show each address before
and after translation as it works.
-The
+The
.IR -w ,
watch, flag will cause
.B expn
to show you its conversations with the mail daemons.
-Finally, the
+Finally, the
.IR -d ,
debug, flag will expose many of the inner workings so that
it is possible to eliminate bugs.
@@ -1320,15 +1319,15 @@ No enviroment variables are used.
.SH FILES
.PD 0
.B /tmp/expn$$
-.B temporary file used as input to
+.B temporary file used as input to
.BR nslookup .
.SH SEE ALSO
-.BR aliases (5),
+.BR aliases (5),
.BR sendmail (8),
.BR nslookup (8),
RFC 823, and RFC 1123.
.SH BUGS
-Not all mail daemons will implement
+Not all mail daemons will implement
.B expn
or
.BR vrfy .
@@ -1340,19 +1339,19 @@ When attempting to connect to a system to verify an address,
only tries one IP address. Most mail daemons
will try harder.
.LP
-It is assumed that you are running domain names and that
-the
-.BR nslookup (8)
-program is available. If not,
+It is assumed that you are running domain names and that
+the
+.BR nslookup (8)
+program is available. If not,
.B expn
will not be able to verify many addresses. It will also pause
for a long time unless you change the code where it says
.I $have_nslookup = 1
to read
-.I $have_nslookup =
+.I $have_nslookup =
.IR 0 .
.LP
-Lastly,
+Lastly,
.B expn
does not handle every valid address. If you have an example,
please submit a bug report.
@@ -1362,7 +1361,7 @@ that did about the same thing. It has since suffered bit rot
and Jon Broome has dropped off the face of the earth!
(Jon, if you are out there, drop me a line)
.SH AVAILABILITY
-The latest version of
+The latest version of
.B expn
is available through anonymous ftp at
.IR ftp://ftp.idiom.com/pub/muir-programs/expn .
OpenPOWER on IntegriCloud