diff -cr sendmail-8.9.0/BuildTools/OS/BSD-OS sendmail-8.9.1/BuildTools/OS/BSD-OS *** sendmail-8.9.0/BuildTools/OS/BSD-OS Tue May 19 16:33:39 1998 --- sendmail-8.9.1/BuildTools/OS/BSD-OS Wed Jun 3 19:14:22 1998 *************** *** 1,5 **** ! # @(#)BSD-OS 8.7 (Berkeley) 3/13/98 define(`confMAPDEF', `-DNEWDB -DMAP_REGEX') define(`confENVDEF', `-DNETISO') define(`confLIBS', `-lutil -lkvm') define(`confOPTIMIZE', `-O2') --- 1,8 ---- ! # @(#)BSD-OS 8.8 (Berkeley) 6/3/98 define(`confMAPDEF', `-DNEWDB -DMAP_REGEX') define(`confENVDEF', `-DNETISO') define(`confLIBS', `-lutil -lkvm') define(`confOPTIMIZE', `-O2') + define(`confMAN1EXT', `0') + define(`confMAN5EXT', `0') + define(`confMAN8EXT', `0') diff -cr sendmail-8.9.0/BuildTools/OS/DomainOS sendmail-8.9.1/BuildTools/OS/DomainOS *** sendmail-8.9.0/BuildTools/OS/DomainOS Tue May 19 16:33:40 1998 --- sendmail-8.9.1/BuildTools/OS/DomainOS Wed Jun 24 21:02:38 1998 *************** *** 1,4 **** ! # @(#)DomainOS 8.5 (Berkeley) 3/12/98 define(`confBEFORE', `unistd.h dirent.h') define(`confMAPDEF', `-DNDBM') define(`confSBINDIR', `/usr/etc') --- 1,5 ---- ! # @(#)DomainOS 8.6 (Berkeley) 6/24/98 ! define(`confCC', `cc -A nansi -A,systype,any -A,runtype,bsd4.3') define(`confBEFORE', `unistd.h dirent.h') define(`confMAPDEF', `-DNDBM') define(`confSBINDIR', `/usr/etc') Only in sendmail-8.9.1/BuildTools/OS: DomainOS.10.4 diff -cr sendmail-8.9.0/BuildTools/OS/NeXT.4.x sendmail-8.9.1/BuildTools/OS/NeXT.4.x *** sendmail-8.9.0/BuildTools/OS/NeXT.4.x Tue May 19 16:33:42 1998 --- sendmail-8.9.1/BuildTools/OS/NeXT.4.x Thu Jun 18 10:47:29 1998 *************** *** 1,4 **** ! # @(#)NeXT.4.x 8.7 (Berkeley) 3/12/98 PUSHDIVERT(1) # NEXTSTEP 3.1 and 3.2 only support m68k and i386 #ARCH= -arch m68k -arch i386 -arch hppa -arch sparc --- 1,4 ---- ! # @(#)NeXT.4.x 8.8 (Berkeley) 5/25/98 PUSHDIVERT(1) # NEXTSTEP 3.1 and 3.2 only support m68k and i386 #ARCH= -arch m68k -arch i386 -arch hppa -arch sparc *************** *** 11,16 **** --- 11,17 ---- define(`confENVDEF', `-DNeXT -Wno-precomp -pipe ${RC_CFLAGS}') define(`confLDOPTS', `${RC_CFLAGS}') define(`confLIBS', `-ldbm') + define(`confMANROOT', `/usr/lib/man/cat') define(`confMBINDIR', `/usr/lib') define(`confSBINDIR', `/usr/etc') define(`confUBINDIR', `/usr/ucb') diff -cr sendmail-8.9.0/BuildTools/OS/SCO.4.2 sendmail-8.9.1/BuildTools/OS/SCO.4.2 *** sendmail-8.9.0/BuildTools/OS/SCO.4.2 Tue May 19 16:33:43 1998 --- sendmail-8.9.1/BuildTools/OS/SCO.4.2 Tue Jun 30 15:11:23 1998 *************** *** 1,6 **** ! # @(#)SCO.4.2 8.4 (Berkeley) 2/8/98 define(`confENVDEF', `-D_SCO_unix_4_2 ') define(`confLIBS', `-lsocket -lndbm -lprot_s -lx -lc_s') define(`confMBINDIR', `/usr/lib') define(`confSBINDIR', `/usr/etc') define(`confEBINDIR', `/usr/lib') --- 1,7 ---- ! # @(#)SCO.4.2 8.5 (Berkeley) 6/30/98 define(`confENVDEF', `-D_SCO_unix_4_2 ') define(`confLIBS', `-lsocket -lndbm -lprot_s -lx -lc_s') + define(`confMAPDEF', `-DNDBM') define(`confMBINDIR', `/usr/lib') define(`confSBINDIR', `/usr/etc') define(`confEBINDIR', `/usr/lib') diff -cr sendmail-8.9.0/BuildTools/OS/SCO.5.x sendmail-8.9.1/BuildTools/OS/SCO.5.x *** sendmail-8.9.0/BuildTools/OS/SCO.5.x Tue May 19 16:33:43 1998 --- sendmail-8.9.1/BuildTools/OS/SCO.5.x Tue Jun 30 15:11:23 1998 *************** *** 1,7 **** ! # @(#)SCO.5.x 8.9 (Berkeley) 3/14/98 define(`confCC', `cc -b elf') define(`confLIBS', `-lsocket -lndbm -lprot -lcurses -lm -lx -lgen') ! define(`confMAPDEF', `-DMAP_REGEX') define(`confSBINGRP', `bin') define(`confMBINDIR', `/usr/lib') define(`confSBINDIR', `/usr/etc') --- 1,7 ---- ! # @(#)SCO.5.x 8.10 (Berkeley) 6/30/98 define(`confCC', `cc -b elf') define(`confLIBS', `-lsocket -lndbm -lprot -lcurses -lm -lx -lgen') ! define(`confMAPDEF', `-DMAP_REGEX -DNDBM') define(`confSBINGRP', `bin') define(`confMBINDIR', `/usr/lib') define(`confSBINDIR', `/usr/etc') diff -cr sendmail-8.9.0/BuildTools/README sendmail-8.9.1/BuildTools/README *** sendmail-8.9.0/BuildTools/README Tue May 19 16:33:15 1998 --- sendmail-8.9.1/BuildTools/README Tue Jun 30 23:06:45 1998 *************** *** 16,22 **** will add -I/usr/local/bind/include to the already existing confINCDIRS. Note: There must be no trailing spaces after the last quote mark and ! before the closing parenthesis. By default, sendmail will search your system for include and library directories as well as certain libraries (libdb.* for Berkeley DB and --- 16,23 ---- will add -I/usr/local/bind/include to the already existing confINCDIRS. Note: There must be no trailing spaces after the last quote mark and ! before the closing parenthesis. Also you may need to properly quote ! m4 reserved words as specified by your vendor's m4 command. By default, sendmail will search your system for include and library directories as well as certain libraries (libdb.* for Berkeley DB and *************** *** 106,109 **** confUBINMODE 555 The mode for user-executable binaries. ! @(#)README 8.21 (Berkeley) 5/13/98 --- 107,110 ---- confUBINMODE 555 The mode for user-executable binaries. ! @(#)README 8.22 (Berkeley) 6/30/98 diff -cr sendmail-8.9.0/BuildTools/bin/Build sendmail-8.9.1/BuildTools/bin/Build *** sendmail-8.9.0/BuildTools/bin/Build Tue May 19 16:33:54 1998 --- sendmail-8.9.1/BuildTools/bin/Build Wed Jun 24 21:10:11 1998 *************** *** 10,16 **** # the sendmail distribution. # # ! # @(#)Build 8.88 (Berkeley) 5/19/98 # # --- 10,16 ---- # the sendmail distribution. # # ! # @(#)Build 8.93 (Berkeley) 6/24/98 # # *************** *** 155,160 **** --- 155,166 ---- rel=Mach arch=luna88k fi + elif [ -d /usr/apollo -a -d \`node_data ] + then + # probably a Apollo/DOMAIN + os=DomainOS + arch=$ISP + rel=`/usr/apollo/bin/bldt | grep Domain | awk '{ print $4 }' | sed -e 's/,//g'` fi if [ ! "$arch" -a ! "$os" -a ! "$rel" ] *************** *** 234,239 **** --- 240,249 ---- rel=`uname -v | sed -e 's/\(V.*\)L.*/\1/'` fi;; SINIX-?) os=SINIX;; + DomainOS) case $rel in + 10.4*) rel=10.4;; + esac + ;; esac # get "base part" of operating system release *************** *** 296,301 **** --- 306,317 ---- BUILDTOOLS=${BUILDTOOLS-$SMROOT/BuildTools} export SMROOT BUILDTOOLS + # see if we are in a Build-able directory + if [ ! -f Makefile.m4 ]; then + echo "Makefile.m4 not found. Build can only be run from a source directory." + exit $EX_UNAVAILABLE + fi + # now try to find a reasonable object directory if [ -r obj.$os.$rel.$arch$sfx ]; then obj=obj.$os.$rel.$arch$sfx *************** *** 436,442 **** fi if [ -f $BUILDTOOLS/Site/site.config.m4 ] then ! siteconfig=$BUILDTOOLS/Site/site.config.m4 fi fi if [ ! -z "$siteconfig" ] --- 452,458 ---- fi if [ -f $BUILDTOOLS/Site/site.config.m4 ] then ! siteconfig="$BUILDTOOLS/Site/site.config.m4 $siteconfig" fi fi if [ ! -z "$siteconfig" ] *************** *** 454,474 **** fi echo 'divert(0)dnl' >> $obj/.settings$$ libdirs=`(cat $obj/.settings$$; echo "_SRIDBIL_= confLIBDIRS" ) | \ ! sed -e 's/\(.\)include/\1_include_/g' | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ grep "^_SRIDBIL_=" | \ ! sed -e 's/_include_/include/g' -e "s/^_SRIDBIL_=//"` libsrch=`(cat $obj/.settings$$; echo "_HCRSBIL_= confLIBSEARCH" ) | \ ! sed -e 's/\(.\)include/\1_include_/g' | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ grep "^_HCRSBIL_=" | \ ! sed -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"` echo 'divert(-1)' >> $obj/.settings$$ LIBDIRS="$libdirs" LIBSRCH="$libsrch" SITECONFIG="$siteconfig" sh $BUILDTOOLS/bin/configure.sh $sflag $oscf >> $obj/.settings$$ echo 'divert(0)dnl' >> $obj/.settings$$ ! sed -e 's/\(.\)include/\1_include_/g' $obj/.settings$$ | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - Makefile.m4 | \ ! sed 's/_include_/include/g' > $obj/Makefile if [ $? -ne 0 -o ! -s $obj/Makefile ] then echo "ERROR: ${M4} failed; You may need a newer version of M4, at least as new as System V or GNU" 1>&2 --- 470,490 ---- fi echo 'divert(0)dnl' >> $obj/.settings$$ libdirs=`(cat $obj/.settings$$; echo "_SRIDBIL_= confLIBDIRS" ) | \ ! sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ grep "^_SRIDBIL_=" | \ ! sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_SRIDBIL_=//"` libsrch=`(cat $obj/.settings$$; echo "_HCRSBIL_= confLIBSEARCH" ) | \ ! sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \ grep "^_HCRSBIL_=" | \ ! sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"` echo 'divert(-1)' >> $obj/.settings$$ LIBDIRS="$libdirs" LIBSRCH="$libsrch" SITECONFIG="$siteconfig" sh $BUILDTOOLS/bin/configure.sh $sflag $oscf >> $obj/.settings$$ echo 'divert(0)dnl' >> $obj/.settings$$ ! sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' $obj/.settings$$ | \ ${M4} -DconfBUILDTOOLSDIR=$BUILDTOOLS - Makefile.m4 | \ ! sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' > $obj/Makefile if [ $? -ne 0 -o ! -s $obj/Makefile ] then echo "ERROR: ${M4} failed; You may need a newer version of M4, at least as new as System V or GNU" 1>&2 *************** *** 488,504 **** echo "ERROR: $obj exists but has no Makefile" >&2 exit $EX_NOINPUT fi ! case $makefile ! in ! ../Makefiles/*) ! makefile=`echo $makefile | sed 's/...Makefiles.//'` ! echo "Will run in existing $obj using $makefile" ! ;; ! ! *) ! echo "Will run in existing $obj using custom $makefile" ! ;; ! esac exit 0 fi --- 504,510 ---- echo "ERROR: $obj exists but has no Makefile" >&2 exit $EX_NOINPUT fi ! echo "Will run in existing $obj using $makefile" exit 0 fi diff -cr sendmail-8.9.0/FAQ sendmail-8.9.1/FAQ *** sendmail-8.9.0/FAQ Tue May 19 16:33:00 1998 --- sendmail-8.9.1/FAQ Wed Jun 3 15:59:06 1998 *************** *** 1,11 **** The FAQ is no longer maintained with the sendmail release. It is ! posted regularly to comp.mail.sendmail, comp.mail.misc, comp.mail.smail, ! comp.answers, and news.answers, and can be obtained via anonymous FTP ! from ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/sendmail-faq/. ! If you do not have access to anonymous FTP, you can retrieve it by ! sending email to mail-server@rtfm.mit.edu with the command "send ! usenet/news.answers/mail/sendmail-faq" in the message. ! An HTML version is also available at http://www.sendmail.org/faq/. ! ! --Eric Allman 19 June 1997 --- 1,6 ---- The FAQ is no longer maintained with the sendmail release. It is ! available at http://www.sendmail.org/faq/ . ! A plain-text version of the questions only, with URLs referring to ! the answers, is posted to comp.mail.sendmail on the 10th and 25th ! of each month. diff -cr sendmail-8.9.0/KNOWNBUGS sendmail-8.9.1/KNOWNBUGS *** sendmail-8.9.0/KNOWNBUGS Tue May 19 16:33:00 1998 --- sendmail-8.9.1/KNOWNBUGS Tue Jun 30 14:44:31 1998 *************** *** 73,79 **** getrequests: accept: Connection timed out "Connection timed out" is not documented as a valid return from ! accept(2) and this is believed to be a bug in the Linux kernel. * Excessive mailing list nesting can run out of file descriptors. --- 73,83 ---- getrequests: accept: Connection timed out "Connection timed out" is not documented as a valid return from ! accept(2) and this was believed to be a bug in the Linux kernel. ! Later information from the Linux kernel group states that Linux ! 2.0 kernels follow RFC1122 while sendmail follows the original BSD ! (now POSIX 1003.1g draft) specification. The 2.1.X and later kernels ! will follow the POSIX draft. * Excessive mailing list nesting can run out of file descriptors. *************** *** 140,143 **** STD 11. ! (Version 8.30, last updated 5/18/98) --- 144,147 ---- STD 11. ! (Version 8.32, last updated 6/30/98) diff -cr sendmail-8.9.0/LICENSE sendmail-8.9.1/LICENSE *** sendmail-8.9.0/LICENSE Tue May 19 16:33:01 1998 --- sendmail-8.9.1/LICENSE Wed Jun 24 18:53:02 1998 *************** *** 16,28 **** (a) Redistributions are made at no charge beyond the reasonable cost of materials and delivery. ! (b) Redistributions are accompanied by a copy of the Source Code or by ! an irrevocable offer to provide a copy of the Source Code at the ! cost of materials and delivery. Such redistributions must allow ! further use, modification, and redistribution of the Source Code ! under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete source ! code including all modifications. Other forms of redistribution are allowed only under a separate royalty- free agreement permitting such redistribution subject to standard --- 16,28 ---- (a) Redistributions are made at no charge beyond the reasonable cost of materials and delivery. ! (b) Redistributions are accompanied by a copy of the Source Code or by an ! irrevocable offer to provide a copy of the Source Code for up to three ! years at the cost of materials and delivery. Such redistributions ! must allow further use, modification, and redistribution of the Source ! Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete source ! code of sendmail including all modifications. Other forms of redistribution are allowed only under a separate royalty- free agreement permitting such redistribution subject to standard *************** *** 37,50 **** these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution ! the "Copyright Notice" refers to the following language "Copyright (c) 1998 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written ! permission. The name "sendmail" is a trademark of Sendmail, Inc. and ! may be used only if so ascribed. 5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, whose copyright --- 37,49 ---- these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution ! the "Copyright Notice" refers to the following language: "Copyright (c) 1998 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written ! permission. The name "sendmail" is a trademark of Sendmail, Inc. 5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, whose copyright *************** *** 87,90 **** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ! (Version 8.4, last updated 5/19/98) --- 86,89 ---- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ! (Version 8.6, last updated 6/24/98) diff -cr sendmail-8.9.0/RELEASE_NOTES sendmail-8.9.1/RELEASE_NOTES *** sendmail-8.9.0/RELEASE_NOTES Tue May 19 21:17:28 1998 --- sendmail-8.9.1/RELEASE_NOTES Thu Jul 2 11:06:17 1998 *************** *** 1,11 **** SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.9 (Berkeley) 5/19/98 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. 8.9.0/8.9.0 98/05/19 SECURITY: To prevent users from reading files not normally readable, sendmail will no longer open forward, :include:, --- 1,94 ---- SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.9.1.1 (Berkeley) 7/2/98 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. + 8.9.1/8.9.1 98/07/02 + If both an OS specific site configuration file and a generic + site.config.m4 file existed, only the latter was used + instead of both. Problem noted by Geir Johannessen of + the Norwegian University of Science and Technology. + Fix segmentation fault while converting 8 bit to 7 bit MIME + multipart messages by trying to write to an unopened + file descriptor. Fix from Kari Hurtta of the Finnish + Meteorological Institute. + Do not assume Message: and Text: headers indicate the end of + the header area when parsing MIME headers. Problem noted + by Kari Hurtta of the Finnish Meteorological Institute. + Setting the confMAN#SRC Build variable would only effect the + installation commands. The man pages would still be + built with .0 extensions. Problem noted by Bryan + Costales of InfoBeat, Inc. + Installation of manual pages didn't honor the DESTDIR environment + variable. Problem noted by Bryan Costales of InfoBeat, Inc. + If the check_relay ruleset resolved to the discard mailer, messages + were still delivered. Problem noted by Mirek Luc of NASK. + Mail delivery to files would fail with an Operating System Error + if sendmail was not running as root, i.e. RunAsUser was set. + Problem noted by Leonard N. Zubkoff of Dandelion Digital. + Prevent MinQueueAge from interfering from queued items created + in the future, i.e. if the system clock was set ahead + and then back. Problem noted by Michael Miller of the + University of Natal, Pietermaritzburg. + Do not advertise ETRN support in ESTMP EHLO reply if noetrn is + set in the PrivacyFlags option. Fix from Ted Rule of + Flextech TV. + Log invalid persistent host status file lines instead of + bouncing the message. Problem noted by David Lindes of + DaveLtd Enterprises. + Move creation of empty sendmail.st file from installation to + compilation. Installation may be done from a read-only + mount. Fix from Bryan Costales of InfoBeat, Inc. and Ric + Anderson of the Oasis Research Center, Inc. + Enforce the maximum number of User Database entries limit. Problem + noted by Gary Buchanan of Credence Systems Inc. + Allow dead.letter files in root's home directory. Problem noted + by Anna Ullman of Sun Microsystems. + Program deliveries in forward files could be marked unsafe if + any directory listed in the ForwardPath option did not + exist. Problem noted by Jorg Bielak of Coastal Web Online. + Do not trust the length of the address structure returned by + gethostbyname(). Problem noted by Chris Evans of Oxford + University. + If the SIZE= MAIL From: ESMTP parameter is too large, use the + 5.3.4 DSN status code instead of 5.2.2. Similarly, for + non-local deliveries, if the message is larger than the + mailer maximum message size, use 5.3.4 instead of 5.2.3. + Suggested by Antony Bowesman of + Fujitsu/TeaWARE Mail/MIME System. + Portability: + Fix the check for an IP address reverse lookup for + use in $&{client_name} on 64 bit platforms. + From Gilles Gallot of Institut for Development + and Resources in Intensive Scientific computing. + BSD-OS uses .0 for man page extensions. From Jeff Polk + of BSDI. + DomainOS detection for Build. Also, version 10.4 and later + ship a unistd.h. Fixes from Takanobu Ishimura of + PICT Inc. + NeXT 4.x uses /usr/lib/man/cat for its man pages. From + J. P. McCann of E I A. + SCO 4.X and 5.X include NDBM support. From Vlado Potisk + of TEMPEST, Ltd. + CONFIG: Do not pass spoofed PTR results through resolver for + qualification. Problem noted by Michiel Boland of + Digital Valley Internet Professionals; fix from + Kari Hurtta of the Finnish Meteorological Institute. + CONFIG: Do not try to resolve non-DNS hostnames such as UUCP, + BITNET, and DECNET addresses for resolvable senders. + Problem noted by Alexander Litvin of Lucky Net Ltd. + CONFIG: Work around Sun's broken configuration which sends bounce + messages as coming from @@hostname instead of <>. LMTP + would not accept @@hostname. + OP.ME: Corrections to complex sendmail startup script from Rick + Troxel of the National Institutes of Health. + RMAIL: Do not install rmail by default, require 'make force-install' + as this rmail isn't the same as others. Suggested by + Kari Hurtta of the Finnish Meteorological Institute. + 8.9.0/8.9.0 98/05/19 SECURITY: To prevent users from reading files not normally readable, sendmail will no longer open forward, :include:, *************** *** 300,306 **** disk space. Patch from Randall S. Winchester of the University of Maryland. HP-UX 11.x from Richard Allen of Opin Kerfi HF and ! Regis McEwen of Progress Software Corproration. IRIX 64 bit fixes from Kari Hurtta of the Finnish Meteorological Institute. IRIX 6.2 configuration fix for mail.local from Michael Kyle --- 383,389 ---- disk space. Patch from Randall S. Winchester of the University of Maryland. HP-UX 11.x from Richard Allen of Opin Kerfi HF and ! Regis McEwen of Progress Software Corporation. IRIX 64 bit fixes from Kari Hurtta of the Finnish Meteorological Institute. IRIX 6.2 configuration fix for mail.local from Michael Kyle *************** *** 1425,1431 **** If the F=l flag was set on an SMTP mailer to indicate that it is actually local delivery, and NOTIFY=SUCCESS is specified in the envelope, and the receiving SMTP server speaks DSN, then ! the DSN would be both generated locally and propogated to the other end. The U= mailer field didn't correctly extract the group id if the user id was numeric. Problem noted by Kenneth Herron of --- 1508,1514 ---- If the F=l flag was set on an SMTP mailer to indicate that it is actually local delivery, and NOTIFY=SUCCESS is specified in the envelope, and the receiving SMTP server speaks DSN, then ! the DSN would be both generated locally and propagated to the other end. The U= mailer field didn't correctly extract the group id if the user id was numeric. Problem noted by Kenneth Herron of *************** *** 1435,1441 **** not occur if it exceeded the maximum _output_ size. Problem reported by Kyle Jones of UUNET. PORTABILITY FIXES: ! AIX4: 4.1 does't have a working setreuid(2); change the AIX4 defines to use seteuid(2) instead, which works on 4.1 as well as 4.2. Problem noted by Håkan Lindholm of interAF, Sweden. --- 1518,1524 ---- not occur if it exceeded the maximum _output_ size. Problem reported by Kyle Jones of UUNET. PORTABILITY FIXES: ! AIX4: 4.1 doesn't have a working setreuid(2); change the AIX4 defines to use seteuid(2) instead, which works on 4.1 as well as 4.2. Problem noted by Håkan Lindholm of interAF, Sweden. *************** *** 1485,1491 **** Solaris: Don't use the system getusershell(3); it can apparently corrupt the heap in some circumstances. Problem found by Ken Pizzini of Spry, Inc. ! OP.ME: document several mailer flags that were accidently omitted from this document. These flags were F=d, F=j, F=R, and F=9. CONFIG: no changes. --- 1568,1574 ---- Solaris: Don't use the system getusershell(3); it can apparently corrupt the heap in some circumstances. Problem found by Ken Pizzini of Spry, Inc. ! OP.ME: document several mailer flags that were accidentally omitted from this document. These flags were F=d, F=j, F=R, and F=9. CONFIG: no changes. *************** *** 1582,1588 **** Log open file descriptors for the "cannot dup" messages in deliver(); this is an attempt to track down a bug that one person seems to be having (it may be a Solaris bug!). ! DSN NOTIFY parameters were not properly propogated across queue runs; this caused the NOTIFY info to sometimes be lost. Problem pointed out by Claus Assmann of the Christian-Albrechts-University of Kiel. --- 1665,1671 ---- Log open file descriptors for the "cannot dup" messages in deliver(); this is an attempt to track down a bug that one person seems to be having (it may be a Solaris bug!). ! DSN NOTIFY parameters were not properly propagated across queue runs; this caused the NOTIFY info to sometimes be lost. Problem pointed out by Claus Assmann of the Christian-Albrechts-University of Kiel. *************** *** 1723,1729 **** This could cause mail to addresses such as [foo.com] to bounce or get dropped. Problem noted by Christophe Wolfhugel of the Pasteur Institute. ! DSNs were inconsistent if a failure occured during the DATA phase rather than the RCPT phase: the Action: would be correct, but the detailed status information would be wrong. Problem noted by Bob Snyder of General Electric Company. --- 1806,1812 ---- This could cause mail to addresses such as [foo.com] to bounce or get dropped. Problem noted by Christophe Wolfhugel of the Pasteur Institute. ! DSNs were inconsistent if a failure occurred during the DATA phase rather than the RCPT phase: the Action: would be correct, but the detailed status information would be wrong. Problem noted by Bob Snyder of General Electric Company. *************** *** 1963,1969 **** be set to be lower than Timeout.connect on the principle that the mail should go through quickly to responsive hosts; less responsive hosts get to wait for the next queue run. ! Fix a problem on Solaris that occassionally causes programs (such as vacation) to hang with their standard input connected to a UDP port. It also created some signal handling problems. The problems turned out to be an interaction between vfork(2) --- 2046,2052 ---- be set to be lower than Timeout.connect on the principle that the mail should go through quickly to responsive hosts; less responsive hosts get to wait for the next queue run. ! Fix a problem on Solaris that occasionally causes programs (such as vacation) to hang with their standard input connected to a UDP port. It also created some signal handling problems. The problems turned out to be an interaction between vfork(2) *************** *** 2235,2246 **** Completely delete the Bcc: header if and only if there are other valid recipient headers (To:, Cc: or Apparently-To:, the last being a historic botch, of course). If Bcc: is the ! only recipient header in the message, it's value is tossed, but the header name is kept. The old behaviour (always keep the header name and toss the value) allowed primary recipients to see that a Bcc: went to _someone_. Include queue id on ``Authentication-Warning: : set ! sender to using -f'' syslog messages. Suggested by Kari Hurtta. If a sequence or switch map lookup entry gets a tempfail but then continues on to another map type, but the name is not found, --- 2318,2329 ---- Completely delete the Bcc: header if and only if there are other valid recipient headers (To:, Cc: or Apparently-To:, the last being a historic botch, of course). If Bcc: is the ! only recipient header in the message, its value is tossed, but the header name is kept. The old behaviour (always keep the header name and toss the value) allowed primary recipients to see that a Bcc: went to _someone_. Include queue id on ``Authentication-Warning: : set ! sender to
using -f'' syslog messages. Suggested by Kari Hurtta. If a sequence or switch map lookup entry gets a tempfail but then continues on to another map type, but the name is not found, *************** *** 2274,2280 **** is not set, since this is required to get the actual DSNs created. Problem pointed out by John Gardiner Myers of CMU. Log permission problems that cause .forward and :include: files to ! be untrusted or ignored on log level 12 and higher. Suggestted by Randy Martin of Clemson University. Allow user ids in U= clauses of M lines to have hyphens and underscores. --- 2357,2363 ---- is not set, since this is required to get the actual DSNs created. Problem pointed out by John Gardiner Myers of CMU. Log permission problems that cause .forward and :include: files to ! be untrusted or ignored on log level 12 and higher. Suggested by Randy Martin of Clemson University. Allow user ids in U= clauses of M lines to have hyphens and underscores. *************** *** 2301,2307 **** Technological University. When converting a message to Quoted-Printable, prevent any lines with dots alone on a line by themselves. This is because of the ! preponderence of broken mailers that still get this wrong. Code contributed by Per Hedeland of Ericsson. Fix F{macro}/file construct -- it previously did nothing. Pointed out by Bjart Kvarme of USIT/UiO (Norway). --- 2384,2390 ---- Technological University. When converting a message to Quoted-Printable, prevent any lines with dots alone on a line by themselves. This is because of the ! preponderance of broken mailers that still get this wrong. Code contributed by Per Hedeland of Ericsson. Fix F{macro}/file construct -- it previously did nothing. Pointed out by Bjart Kvarme of USIT/UiO (Norway). *************** *** 2335,2341 **** Extensive cleanups to map open code to handle a locking race condition in ndbm, hash, and btree format database files on some (most non-4.4-BSD based) OS architectures. This should solve the ! occassional "user unknown" problem during alias rebuilds that has plagued me for quite some time. Based on a patch from Thomas Dwyer III of Michigan Technological University. PORTABILITY FIXES: --- 2418,2424 ---- Extensive cleanups to map open code to handle a locking race condition in ndbm, hash, and btree format database files on some (most non-4.4-BSD based) OS architectures. This should solve the ! occasional "user unknown" problem during alias rebuilds that has plagued me for quite some time. Based on a patch from Thomas Dwyer III of Michigan Technological University. PORTABILITY FIXES: *************** *** 2479,2485 **** If you have a name with a trailing dot, and you try looking it up using gethostbyname without the dot (for /etc/hosts compatibility), be sure to turn off RES_DEFNAMES and ! RES_DNSRCH to avoid finding the wrong name accidently. Problem noted by Charles Amos of the University of Maryland. Don't do timeouts in collect if you are not running SMTP. --- 2562,2568 ---- If you have a name with a trailing dot, and you try looking it up using gethostbyname without the dot (for /etc/hosts compatibility), be sure to turn off RES_DEFNAMES and ! RES_DNSRCH to avoid finding the wrong name accidentally. Problem noted by Charles Amos of the University of Maryland. Don't do timeouts in collect if you are not running SMTP. *************** *** 2746,2752 **** contributed by Roy Mongiovi of Georgia Tech (my main contribution was to make it configurable). Save i-number of df file in qf file to simplify rebuilding of queue ! after disasterous disk crash. Suggested by Kyle Jones of UUNET; closely based on code from KJS DECWRL code written by Paul Vixie. NOTA BENE: The qf files produced by 8.7 are NOT back compatible with 8.6 -- that is, you can convert --- 2829,2835 ---- contributed by Roy Mongiovi of Georgia Tech (my main contribution was to make it configurable). Save i-number of df file in qf file to simplify rebuilding of queue ! after disastrous disk crash. Suggested by Kyle Jones of UUNET; closely based on code from KJS DECWRL code written by Paul Vixie. NOTA BENE: The qf files produced by 8.7 are NOT back compatible with 8.6 -- that is, you can convert *************** *** 3180,3187 **** Probe the network interfaces to find alternate names for this host. Requires the SIOCGIFCONF ioctl call. Code contributed by SunSoft. ! Add "E" configuration line to set or propogate environment ! variables into children. "E" will propogate the named variable from the environment when sendmail was invoked into any children it calls; "E=" sets the named variable to the indicated value. Any --- 3263,3270 ---- Probe the network interfaces to find alternate names for this host. Requires the SIOCGIFCONF ioctl call. Code contributed by SunSoft. ! Add "E" configuration line to set or propagate environment ! variables into children. "E" will propagate the named variable from the environment when sendmail was invoked into any children it calls; "E=" sets the named variable to the indicated value. Any *************** *** 3359,3370 **** Rochester Medical Center. Altos System V (``the first UNIX/XENIX merge the Altos did for their Series 1000 & Series 2000 line; ! their merged code was licenced back to AT&T and Microsoft and became System V release 3.2'') from Tim Rice . OSF/1 running on Intel Paragon from Jeff A. Earickson of Intel Scalable Systems ! Divison. Amdahl UTS System V 2.1.5 (SVr3-based) from Janet Jackson . System V Release 4 (statvfs semantic fix) from Alain --- 3442,3453 ---- Rochester Medical Center. Altos System V (``the first UNIX/XENIX merge the Altos did for their Series 1000 & Series 2000 line; ! their merged code was licensed back to AT&T and Microsoft and became System V release 3.2'') from Tim Rice . OSF/1 running on Intel Paragon from Jeff A. Earickson of Intel Scalable Systems ! Division. Amdahl UTS System V 2.1.5 (SVr3-based) from Janet Jackson . System V Release 4 (statvfs semantic fix) from Alain *************** *** 3517,3523 **** properly deal with ``group: addr1, ... addrN;'' syntax. CONFIG: Require OSTYPE macro (the defaults really don't apply to any real systems any more) and tweak the DOMAIN macro ! so that it is less likely that users will accidently use the Berkeley defaults. Also, create some generic files that really can be used in the real world. CONFIG: Add new configuration macros to set character sets for --- 3600,3606 ---- properly deal with ``group: addr1, ... addrN;'' syntax. CONFIG: Require OSTYPE macro (the defaults really don't apply to any real systems any more) and tweak the DOMAIN macro ! so that it is less likely that users will accidentally use the Berkeley defaults. Also, create some generic files that really can be used in the real world. CONFIG: Add new configuration macros to set character sets for *************** *** 3732,3738 **** because it was passed as a printf-style format string. In some cases this could cause core dumps. Avoid possible buffer overrun in returntosender() if error ! message is quite ling. From Fletcher Mattox of the University of Texas. Fix a problem that would silently drop "too many hops" error messages if and only if you were sending to an alias. --- 3815,3821 ---- because it was passed as a printf-style format string. In some cases this could cause core dumps. Avoid possible buffer overrun in returntosender() if error ! message is quite long. From Fletcher Mattox of the University of Texas. Fix a problem that would silently drop "too many hops" error messages if and only if you were sending to an alias. *************** *** 4107,4113 **** DOC: Clarify $@ and $: in the Install & Op Guide. From Kimmo Suominen. Portability fixes: ! Unicos from David L. Kensiski of Sterling Sofware. DomainOS from Don Lewis of Silicon Systems. GNU m4 1.0.3 from Karst Koymans of Utrecht University. Convex from Kimmo Suominen . --- 4190,4196 ---- DOC: Clarify $@ and $: in the Install & Op Guide. From Kimmo Suominen. Portability fixes: ! Unicos from David L. Kensiski of Sterling Software. DomainOS from Don Lewis of Silicon Systems. GNU m4 1.0.3 from Karst Koymans of Utrecht University. Convex from Kimmo Suominen . *************** *** 4158,4165 **** the assumption that the alias file is well controlled. Security fix: root was not treated suspiciously enough when looking into subdirectories. This would potentially ! allow a cracker to examine files that were publically ! readable but in a non-publically searchable directory. Fix a problem that causes an error on QUIT on a cached connection to create problems on the current job. These are typically unrelated, so errors occur in --- 4241,4248 ---- the assumption that the alias file is well controlled. Security fix: root was not treated suspiciously enough when looking into subdirectories. This would potentially ! allow a cracker to examine files that were publicly ! readable but in a non-publicly searchable directory. Fix a problem that causes an error on QUIT on a cached connection to create problems on the current job. These are typically unrelated, so errors occur in *************** *** 4514,4520 **** Portability fixes for A/UX and Encore UMAX V. Fix error message handling -- if you had a name server down causing an error during parsing, that message was never ! propogated to the queue file. 8.6/8.6 93/10/05 Configuration cleanup: make it easier to undo IDENTPROTO in --- 4597,4603 ---- Portability fixes for A/UX and Encore UMAX V. Fix error message handling -- if you had a name server down causing an error during parsing, that message was never ! propagated to the queue file. 8.6/8.6 93/10/05 Configuration cleanup: make it easier to undo IDENTPROTO in *************** *** 5007,5019 **** If the name server timed out over several days, no "timed out" message would ever be sent back. The timeout code has been moved from markfailure() to dropenvelope() ! so that all such failures should be diagnosted. Pointed out by Christophe Wolfhugel and others. Relax safefile() constraints: directories in an include or forward path must be readable by self if the controlling user owns the entry, readable by all otherwise (e.g., when reading your .forward file, you have to own and ! have X permssion in it; everyone needs X permission in the root and directories leading up to your home); include files must be readable by anyone, but need not be owned by you. --- 5090,5102 ---- If the name server timed out over several days, no "timed out" message would ever be sent back. The timeout code has been moved from markfailure() to dropenvelope() ! so that all such failures should be diagnosed. Pointed out by Christophe Wolfhugel and others. Relax safefile() constraints: directories in an include or forward path must be readable by self if the controlling user owns the entry, readable by all otherwise (e.g., when reading your .forward file, you have to own and ! have X permission in it; everyone needs X permission in the root and directories leading up to your home); include files must be readable by anyone, but need not be owned by you. *************** *** 5047,5053 **** log. For example, if you lost a connection, don't bother reporting that fact on the connection you lost. Add some "extended debugging" flags to try to track down ! why we get occassional problems with file descriptor one being closed when execing a mailer; it seems to only happen when there has been another error in the same transaction. This requires XDEBUG, defined --- 5130,5136 ---- log. For example, if you lost a connection, don't bother reporting that fact on the connection you lost. Add some "extended debugging" flags to try to track down ! why we get occasional problems with file descriptor one being closed when execing a mailer; it seems to only happen when there has been another error in the same transaction. This requires XDEBUG, defined *************** *** 5166,5172 **** the first database listed. Rearrange doc subdirectory for 4.4BSD release tape. CONFIG: put $r into the Received line. This was an oversight. ! CONFIG: fix typo (call to ruleset 99 should have been rulset 90). CONFIG: move "auxiliary" subroutines to be in ruleset 90-99 range -- in the long run, single digit rulesets may become reserved for builtin use by sendmail. --- 5249,5255 ---- the first database listed. Rearrange doc subdirectory for 4.4BSD release tape. CONFIG: put $r into the Received line. This was an oversight. ! CONFIG: fix typo (call to ruleset 99 should have been ruleset 90). CONFIG: move "auxiliary" subroutines to be in ruleset 90-99 range -- in the long run, single digit rulesets may become reserved for builtin use by sendmail. *************** *** 5575,5581 **** Eric Wassenaar. Always respond "quickly" to RCPT command; do alias expansion and the like later. This also means that mail for lists that ! have errors will be acccepted, and an error sent back later. This is done by instantiating the queue file and then immediately running and requeueing it. --- 5658,5664 ---- Eric Wassenaar. Always respond "quickly" to RCPT command; do alias expansion and the like later. This also means that mail for lists that ! have errors will be accepted, and an error sent back later. This is done by instantiating the queue file and then immediately running and requeueing it. diff -cr sendmail-8.9.0/cf/README sendmail-8.9.1/cf/README *** sendmail-8.9.0/cf/README Tue May 19 16:45:03 1998 --- sendmail-8.9.1/cf/README Tue Jun 30 14:16:35 1998 *************** *** 4,10 **** Eric Allman ! @(#)README 8.171 (Berkeley) 5/19/98 This document describes the sendmail configuration files being used --- 4,10 ---- Eric Allman ! @(#)README 8.174 (Berkeley) 6/30/98 This document describes the sendmail configuration files being used *************** *** 46,52 **** sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for clusters of clients using a single mail host). Others are versions that we use at Berkeley, although not all are in current use. For ! example, ucbarpa has gone away, but I've left ucbarpa.mc in because it demonstrates some interesting techniques. I'm not pretending that this README describes everything that these --- 46,52 ---- sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for clusters of clients using a single mail host). Others are versions that we use at Berkeley, although not all are in current use. For ! example, ucbvax has gone away, but I've left ucbvax.mc in because it demonstrates some interesting techniques. I'm not pretending that this README describes everything that these *************** *** 57,63 **** *** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** *** Berkeley-specific assumptions built in, such as the name *** *** of our UUCP-relay. You'll want to create your own domain *** ! *** description, and use that in place of domain/Berkeley.m4. *** ******************************************************************* --- 57,64 ---- *** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** *** Berkeley-specific assumptions built in, such as the name *** *** of our UUCP-relay. You'll want to create your own domain *** ! *** description, and use that in place of *** ! *** domain/Berkeley.EDU.m4. *** ******************************************************************* *************** *** 158,164 **** Sendmail uses the M4 macro processor to ``compile'' the configuration files. The most important thing to know is that M4 is stream-based, that is, it doesn't understand about lines. For this reason, in some ! places you may see the word ``dnl'', which standards for ``delete through newline''; essentially, it deletes all characters starting at the ``dnl'' up to and including the next newline character. In most cases sendmail uses this only to avoid lots of unnecessary --- 159,165 ---- Sendmail uses the M4 macro processor to ``compile'' the configuration files. The most important thing to know is that M4 is stream-based, that is, it doesn't understand about lines. For this reason, in some ! places you may see the word ``dnl'', which stands for ``delete through newline''; essentially, it deletes all characters starting at the ``dnl'' up to and including the next newline character. In most cases sendmail uses this only to avoid lots of unnecessary *************** *** 513,519 **** names for this host. This might be used if you were on a host that MXed for a dynamic set of other hosts. If the set is static, just including the line ! "Cw ..." is probably superior. The actual filename can be overridden by redefining confCW_FILE. --- 514,521 ---- names for this host. This might be used if you were on a host that MXed for a dynamic set of other hosts. If the set is static, just including the line ! "Cw ..." (where the names are fully ! qualified domain names) is probably superior. The actual filename can be overridden by redefining confCW_FILE. *************** *** 1274,1280 **** (or any host within the cyberspammer.com domain), and any host on the 206.117.147.* network. ! The value part of thee map can contain: OK accept mail even if other rules in the running ruleset would reject it. --- 1276,1282 ---- (or any host within the cyberspammer.com domain), and any host on the 206.117.147.* network. ! The value part of the map can contain: OK accept mail even if other rules in the running ruleset would reject it. *************** *** 2034,2040 **** compromise system security and should not be used unless absolutely necessary. - confSMTP_MAILER - [esmtp] The mailer name used when confREJECT_MSG - [550 Access denied] The message given if the access database contains REJECT in the value portion. --- 2036,2041 ---- diff -cr sendmail-8.9.0/cf/cf/knecht.mc sendmail-8.9.1/cf/cf/knecht.mc *** sendmail-8.9.0/cf/cf/knecht.mc Tue May 19 16:34:11 1998 --- sendmail-8.9.1/cf/cf/knecht.mc Thu Jun 11 13:33:12 1998 *************** *** 16,22 **** # divert(0)dnl ! VERSIONID(`@(#)knecht.mc 8.28 (Berkeley) 5/19/98') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl --- 16,22 ---- # divert(0)dnl ! VERSIONID(`@(#)knecht.mc 8.30 (Berkeley) 6/11/98') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl *************** *** 25,30 **** --- 25,31 ---- define(`confTO_ICONNECT', `10s')dnl define(`confCOPY_ERRORS_TO', `Postmaster')dnl define(`confTO_QUEUEWARN', `8h')dnl + define(`confTRUSTED_USERS', `www')dnl define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')dnl FEATURE(virtusertable)dnl FEATURE(access_db)dnl *************** *** 43,53 **** Kcheckaddress regex -a@MATCH ^([0-9]+<@(aol|msn)\.com|[0-9][^<]*<@juno\.com|.{10}[^<]+<@aol\.com)\.?> LOCAL_RULESETS HTo: $>CheckTo SCheckTo ! Rfriend@$* $#error $: "553 Header error" HMessage-Id: $>CheckMessageId --- 44,61 ---- Kcheckaddress regex -a@MATCH ^([0-9]+<@(aol|msn)\.com|[0-9][^<]*<@juno\.com|.{10}[^<]+<@aol\.com)\.?> + # + # Names that won't be allowed in a To: line (local-part and domains) + # + C{RejectToLocalparts} friend you + C{RejectToDomains} public.com + LOCAL_RULESETS HTo: $>CheckTo SCheckTo ! R$={RejectToLocalparts}@$* $#error $: "553 Header error" ! R$*@$={RejectToDomains} $#error $: "553 Header error" HMessage-Id: $>CheckMessageId diff -cr sendmail-8.9.0/cf/m4/proto.m4 sendmail-8.9.1/cf/m4/proto.m4 *** sendmail-8.9.0/cf/m4/proto.m4 Tue May 19 16:34:41 1998 --- sendmail-8.9.1/cf/m4/proto.m4 Tue Jun 30 11:23:41 1998 *************** *** 12,18 **** # divert(0) ! VERSIONID(`@(#)proto.m4 8.218 (Berkeley) 5/19/98') MAILER(local)dnl --- 12,18 ---- # divert(0) ! VERSIONID(`@(#)proto.m4 8.223 (Berkeley) 6/30/98') MAILER(local)dnl *************** *** 711,716 **** --- 711,717 ---- SParse0 R<@> $@ <@> special case error msgs R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses" + #R@ <@ $* > < @ $1 > catch "@@host" bogosity R<@ $+> $#error $@ 5.1.3 $: "User address required" R$* $: <> $1 R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3 *************** *** 1084,1089 **** --- 1085,1092 ---- R<> $@ R$* $: $>Parse0 $>3 $1 make domain canonical R $* < @ $+ . > $* $1 < @ $2 > $3 strip trailing dots + # handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc) + R $* < $* $=P > $* $: $1 < @ $2 $3 > $4 ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_', `R $* < @ $+ > $* $: $1 < @ $2 > $3 ... unresolvable OK', `R $* < @ $+ > $* $: $) > $1 < @ $2 > $3 *************** *** 1201,1213 **** R<$*> $* $: $2', `dnl') ! # local user ! R$- $@ OK # anything originating locally is ok ! R$* $: $&{client_name} # pass to name server to make hostname canonical ! R$* $~P $: $[ $1 $2 $] R$* . $1 strip trailing dots R$@ $@ OK ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl --- 1204,1223 ---- R<$*> $* $: $2', `dnl') ! # check for local user (i.e. unqualified address) ! R$* $: $1 ! R $+ < @ $+ > $: $1 < @ $2 > ! # local user is ok ! R $+ $@ OK ! R<$+> $* $: $2 # anything originating locally is ok ! R$* $: $&{client_name} ! # check if bracketed IP address (forward lookup != reverse lookup) ! R [$+] $: [$1] # pass to name server to make hostname canonical ! R $* $~P $: $[ $1 $2 $] ! R<$-> $* $: $2 R$* . $1 strip trailing dots R$@ $@ OK ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl *************** *** 1227,1232 **** --- 1237,1243 ---- # check IP address R$* $: $&{client_addr} R$@ $@ OK originated locally + R0 $@ OK originated locally R$=R $* $@ OK relayable IP address ifdef(`ACCESS_TABLE', `dnl R$* $: $>LookUpAddress <$1> <$1> diff -cr sendmail-8.9.0/cf/m4/version.m4 sendmail-8.9.1/cf/m4/version.m4 *** sendmail-8.9.0/cf/m4/version.m4 Tue May 19 16:34:41 1998 --- sendmail-8.9.1/cf/m4/version.m4 Thu Jul 2 11:05:26 1998 *************** *** 10,17 **** # the sendmail distribution. # # ! VERSIONID(`@(#)version.m4 8.9 (Berkeley) 5/19/98') # divert(0) # Configuration version number ! DZ8.9.0`'ifdef(`confCF_VERSION', `/confCF_VERSION') --- 10,17 ---- # the sendmail distribution. # # ! VERSIONID(`@(#)version.m4 8.9.1.1 (Berkeley) 7/2/98') # divert(0) # Configuration version number ! DZ8.9.1`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff -cr sendmail-8.9.0/cf/mailer/local.m4 sendmail-8.9.1/cf/mailer/local.m4 *** sendmail-8.9.0/cf/mailer/local.m4 Tue May 19 16:34:46 1998 --- sendmail-8.9.1/cf/mailer/local.m4 Tue Jun 30 11:28:18 1998 *************** *** 23,29 **** ### Local and Program Mailer specification ### ################################################## ! VERSIONID(`@(#)local.m4 8.29 (Berkeley) 5/19/98') Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40, _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix, --- 23,29 ---- ### Local and Program Mailer specification ### ################################################## ! VERSIONID(`@(#)local.m4 8.30 (Berkeley) 6/30/98') Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40, _OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix, *************** *** 37,42 **** --- 37,43 ---- # S10 R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity R$+ $: $>50 $1 add local domain if needed R$* $: $>94 $1 do masquerading *************** *** 51,56 **** --- 52,58 ---- # S30 R<@> $n errors to mailer-daemon + R@ <@ $*> $n temporarily bypass Sun bogosity R$+ $: $>50 $1 add local domain if needed R$* $: $>93 $1 do masquerading diff -cr sendmail-8.9.0/doc/op/op.me sendmail-8.9.1/doc/op/op.me *** sendmail-8.9.0/doc/op/op.me Tue May 19 16:35:18 1998 --- sendmail-8.9.1/doc/op/op.me Mon Jun 29 17:09:19 1998 *************** *** 8,14 **** .\" the sendmail distribution. .\" .\" ! .\" @(#)op.me 8.127 (Berkeley) 5/19/98 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' --- 8,14 ---- .\" the sendmail distribution. .\" .\" ! .\" @(#)op.me 8.129 (Berkeley) 6/29/98 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' *************** *** 46,52 **** Sendmail, Inc. eric@Sendmail.COM .sp ! Version 8.127 .sp For Sendmail Version 8.9 .)l --- 46,52 ---- Sendmail, Inc. eric@Sendmail.COM .sp ! Version 8.129 .sp For Sendmail Version 8.9 .)l *************** *** 613,619 **** in a fashion similar to .i newaliases . This command lists the status of the last mail transaction ! with all remote hosts. It functions only when the .b HostStatusDirectory option is set. --- 613,621 ---- in a fashion similar to .i newaliases . This command lists the status of the last mail transaction ! with all remote hosts. The ! .b \-v ! flag will prevent the status display from being truncated. It functions only when the .b HostStatusDirectory option is set. *************** *** 728,733 **** --- 730,736 ---- for an example of a complex script which does this clean up. .(z .hl + #!/bin/sh # remove zero length qf files for qffile in qf* do *************** *** 749,756 **** echo \-n " " > /dev/console mv $tffile $qffile else ! echo \-n " " > /dev/console ! rm \-f $tffile fi done # remove df files with no corresponding qf files --- 752,762 ---- echo \-n " " > /dev/console mv $tffile $qffile else ! if [ \-f $tffile ] ! then ! echo \-n " " > /dev/console ! rm \-f $tffile ! fi fi done # remove df files with no corresponding qf files *************** *** 766,772 **** # announce files that have been saved during disaster recovery for xffile in [A-Z]f* do ! echo \-n " " > /dev/console done .sp .ce --- 772,781 ---- # announce files that have been saved during disaster recovery for xffile in [A-Z]f* do ! if [ \-f $xffile ] ! then ! echo \-n " " > /dev/console ! fi done .sp .ce *************** *** 8193,8199 **** .\".sz 10 .\"Eric Allman .\".sp ! .\"Version 8.127 .\".ce 0 .bp 3 .ce --- 8202,8208 ---- .\".sz 10 .\"Eric Allman .\".sp ! .\"Version 8.129 .\".ce 0 .bp 3 .ce Only in sendmail-8.9.0/mail.local: Build diff -cr sendmail-8.9.0/mail.local/Makefile.m4 sendmail-8.9.1/mail.local/Makefile.m4 *** sendmail-8.9.0/mail.local/Makefile.m4 Tue May 19 16:35:36 1998 --- sendmail-8.9.1/mail.local/Makefile.m4 Thu Jun 4 14:27:14 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.18 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.21 (Berkeley) 6/4/98 # # C compiler *************** *** 50,75 **** BEFORE= snprintf.c confBEFORE OBJS= mail.local.o snprintf.o ${OBJADD} - LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq - - ALL= mail.local mail.local.0 - - all: ${ALL} - - mail.local: ${BEFORE} ${OBJS} - ${CC} -o mail.local ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - snprintf.c: ${SRCDIR}/snprintf.c - -ln -s ${SRCDIR}/snprintf.c snprintf.c - - undivert(3) - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - mail.local.0: mail.local.8 - ${NROFF} ${MANDOC} mail.local.8 > mail.local.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confSBINOWN', `confSBINOWN', `root') BINGRP= ifdef(`confSBINGRP', `confSBINGRP', `bin') --- 50,58 ---- *************** *** 79,89 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: @echo "NOTE: This version of mail.local is not suited for some operating" @echo " systems such as HP-UX and Solaris. Please consult the" --- 62,87 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= mail.local mail.local.${MAN8SRC} + + all: ${ALL} + + mail.local: ${BEFORE} ${OBJS} + ${CC} -o mail.local ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + snprintf.c: ${SRCDIR}/snprintf.c + -ln -s ${SRCDIR}/snprintf.c snprintf.c + + undivert(3) + + mail.local.${MAN8SRC}: mail.local.8 + ${NROFF} ${MANDOC} mail.local.8 > mail.local.${MAN8SRC} + install: @echo "NOTE: This version of mail.local is not suited for some operating" @echo " systems such as HP-UX and Solaris. Please consult the" *************** *** 95,106 **** install-mail.local: mail.local ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mail.local ${BINDIR} ! install-docs: mail.local.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mail.local.${MAN8SRC} ${MAN8}/mail.local.${MAN8EXT}') clean: ! rm -f ${OBJS} mail.local mail.local.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 93,104 ---- install-mail.local: mail.local ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mail.local ${BINDIR} ! install-docs: mail.local.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mail.local.${MAN8SRC} ${MAN8}/mail.local.${MAN8EXT}') clean: ! rm -f ${OBJS} mail.local mail.local.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', Only in sendmail-8.9.0/mailstats: Build diff -cr sendmail-8.9.0/mailstats/Makefile.m4 sendmail-8.9.1/mailstats/Makefile.m4 *** sendmail-8.9.0/mailstats/Makefile.m4 Tue May 19 16:35:39 1998 --- sendmail-8.9.1/mailstats/Makefile.m4 Mon Jun 8 14:06:48 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.11 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.14 (Berkeley) 6/4/98 # # C compiler *************** *** 50,70 **** BEFORE= confBEFORE OBJS= mailstats.o ${OBJADD} - ALL= mailstats mailstats.0 - - all: ${ALL} - - mailstats: ${BEFORE} ${OBJS} - ${CC} -o mailstats ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - undivert(3) - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - mailstats.0: mailstats.8 - ${NROFF} ${MANDOC} mailstats.8 > mailstats.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') --- 50,58 ---- *************** *** 74,95 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: install-mailstats install-docs install-mailstats: mailstats ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${BINDIR} ! install-docs: mailstats.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailstats.${MAN8SRC} ${MAN8}/mailstats.${MAN8EXT}') clean: ! rm -f ${OBJS} mailstats mailstats.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 62,95 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= mailstats mailstats.${MAN8SRC} + + all: ${ALL} + + mailstats: ${BEFORE} ${OBJS} + ${CC} -o mailstats ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + undivert(3) + + mailstats.${MAN8SRC}: mailstats.8 + ${NROFF} ${MANDOC} mailstats.8 > mailstats.${MAN8SRC} + install: install-mailstats install-docs install-mailstats: mailstats ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${BINDIR} ! install-docs: mailstats.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailstats.${MAN8SRC} ${MAN8}/mailstats.${MAN8EXT}') clean: ! rm -f ${OBJS} mailstats mailstats.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', diff -cr sendmail-8.9.0/mailstats/mailstats.c sendmail-8.9.1/mailstats/mailstats.c *** sendmail-8.9.0/mailstats/mailstats.c Tue May 19 16:35:39 1998 --- sendmail-8.9.1/mailstats/mailstats.c Thu Jul 2 11:27:59 1998 *************** *** 1,5 **** /* ! * Copyright (c) 1988 Sendmail, Inc. All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. --- 1,5 ---- /* ! * Copyright (c) 1998 Sendmail, Inc. All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. *************** *** 18,27 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mailstats.c 8.22 (Berkeley) 5/19/98"; #endif /* not lint */ ! #define NOT_SENDMAIL #include #include #include --- 18,29 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mailstats.c 8.26 (Berkeley) 7/2/98"; #endif /* not lint */ ! #ifndef NOT_SENDMAIL ! # define NOT_SENDMAIL ! #endif #include #include #include *************** *** 225,238 **** } printf("Statistics from %s", ctime(&stat.stat_itime)); ! printf(" M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis%s\n", mnames ? " Mailer" : ""); for (i = 0; i < MAXMAILERS; i++) { if (stat.stat_nf[i] || stat.stat_nt[i] || stat.stat_nr[i] || stat.stat_nd[i]) { ! printf("%2d %6ld %10ldK %6ld %10ldK %6ld %6ld", i, stat.stat_nf[i], stat.stat_bf[i], stat.stat_nt[i], stat.stat_bt[i], stat.stat_nr[i], stat.stat_nd[i]); --- 227,240 ---- } printf("Statistics from %s", ctime(&stat.stat_itime)); ! printf(" M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis%s\n", mnames ? " Mailer" : ""); for (i = 0; i < MAXMAILERS; i++) { if (stat.stat_nf[i] || stat.stat_nt[i] || stat.stat_nr[i] || stat.stat_nd[i]) { ! printf("%2d %8ld %10ldK %8ld %10ldK %6ld %6ld", i, stat.stat_nf[i], stat.stat_bf[i], stat.stat_nt[i], stat.stat_bt[i], stat.stat_nr[i], stat.stat_nd[i]); *************** *** 247,254 **** dismsgs += stat.stat_nd[i]; } } ! printf("=========================================================\n"); ! printf(" T %6ld %10ldK %6ld %10ldK %6ld %6ld\n", frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs); exit(EX_OK); } --- 249,256 ---- dismsgs += stat.stat_nd[i]; } } ! printf("=============================================================\n"); ! printf(" T %8ld %10ldK %8ld %10ldK %6ld %6ld\n", frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs); exit(EX_OK); } Only in sendmail-8.9.0/makemap: Build diff -cr sendmail-8.9.0/makemap/Makefile.m4 sendmail-8.9.1/makemap/Makefile.m4 *** sendmail-8.9.0/makemap/Makefile.m4 Tue May 19 16:35:42 1998 --- sendmail-8.9.1/makemap/Makefile.m4 Thu Jun 4 14:27:18 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.17 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.20 (Berkeley) 6/4/98 # # C compiler *************** *** 57,85 **** BEFORE= confBEFORE safefile.c snprintf.c OBJS= makemap.o safefile.o snprintf.o ${OBJADD} - LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq - - ALL= makemap makemap.0 - - all: ${ALL} - - makemap: ${BEFORE} ${OBJS} - ${CC} -o makemap ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - safefile.c: ${SRCDIR}/safefile.c - -ln -s ${SRCDIR}/safefile.c safefile.c - - snprintf.c: ${SRCDIR}/snprintf.c - -ln -s ${SRCDIR}/snprintf.c snprintf.c - - undivert(3) - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - makemap.0: makemap.8 - ${NROFF} ${MANDOC} makemap.8 > makemap.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') --- 57,65 ---- *************** *** 89,110 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: install-makemap install-docs install-makemap: makemap ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${BINDIR} ! install-docs: makemap.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} makemap.${MAN8SRC} ${MAN8}/makemap.${MAN8EXT}') clean: ! rm -f ${OBJS} makemap makemap.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 69,108 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= makemap makemap.${MAN8SRC} + + all: ${ALL} + + makemap: ${BEFORE} ${OBJS} + ${CC} -o makemap ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + safefile.c: ${SRCDIR}/safefile.c + -ln -s ${SRCDIR}/safefile.c safefile.c + + snprintf.c: ${SRCDIR}/snprintf.c + -ln -s ${SRCDIR}/snprintf.c snprintf.c + + undivert(3) + + makemap.${MAN8SRC}: makemap.8 + ${NROFF} ${MANDOC} makemap.8 > makemap.${MAN8SRC} + install: install-makemap install-docs install-makemap: makemap ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${BINDIR} ! install-docs: makemap.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} makemap.${MAN8SRC} ${MAN8}/makemap.${MAN8EXT}') clean: ! rm -f ${OBJS} makemap makemap.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', diff -cr sendmail-8.9.0/makemap/makemap.c sendmail-8.9.1/makemap/makemap.c *** sendmail-8.9.0/makemap/makemap.c Tue May 19 16:35:42 1998 --- sendmail-8.9.1/makemap/makemap.c Wed Jun 24 21:48:00 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)makemap.c 8.59 (Berkeley) 5/19/98"; #endif /* not lint */ #include --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)makemap.c 8.62 (Berkeley) 6/24/98"; #endif /* not lint */ #include *************** *** 20,25 **** --- 20,26 ---- # include #endif #include "sendmail.h" + #include "pathnames.h" #ifdef NDBM # include *************** *** 59,64 **** --- 60,66 ---- bool DontInitGroups = TRUE; long DontBlameSendmail = DBS_SAFE; u_char tTdvect[100]; + uid_t TrustedFileUid = 0; #define BUFSIZE 1024 *************** *** 68,73 **** --- 70,76 ---- char **argv; { char *progname; + char *cfile; bool inclnull = FALSE; bool notrunc = FALSE; bool allowreplace = FALSE; *************** *** 86,91 **** --- 89,96 ---- long dbcachesize = 1024 * 1024; enum type type; int fd; + int sff = SFF_ROOTOK|SFF_REGONLY; + struct passwd *pw; union { #ifdef NDBM *************** *** 111,119 **** #ifdef NDBM char pbuf[MAXNAME]; #endif static char rnamebuf[MAXNAME]; /* holds RealUserName */ - struct passwd *pw; - int sff = SFF_ROOTOK|SFF_REGONLY; struct stat std; #ifdef NDBM struct stat stp; --- 116,126 ---- #ifdef NDBM char pbuf[MAXNAME]; #endif + #if _FFR_TRUSTED_FILE_OWNER + FILE *cfp; + char buf[MAXLINE]; + #endif static char rnamebuf[MAXNAME]; /* holds RealUserName */ struct stat std; #ifdef NDBM struct stat stp; *************** *** 122,127 **** --- 129,135 ---- extern int optind; progname = argv[0]; + cfile = _PATH_SENDMAILCF; RunAsUid = RealUid = getuid(); RunAsGid = RealGid = getgid(); *************** *** 137,150 **** RunAsUserName = RealUserName = rnamebuf; #if _FFR_NEW_MAKEMAP_FLAGS ! #define OPTIONS "Nc:dforsv" #else ! #define OPTIONS "Ndforsv" #endif while ((opt = getopt(argc, argv, OPTIONS)) != EOF) { switch (opt) { case 'N': inclnull = TRUE; break; --- 145,162 ---- RunAsUserName = RealUserName = rnamebuf; #if _FFR_NEW_MAKEMAP_FLAGS ! #define OPTIONS "C:Nc:dforsv" #else ! #define OPTIONS "C:Ndforsv" #endif while ((opt = getopt(argc, argv, OPTIONS)) != EOF) { switch (opt) { + case 'C': + cfile = optarg; + break; + case 'N': inclnull = TRUE; break; *************** *** 220,225 **** --- 232,296 ---- type = T_UNKNOWN; } + #if _FFR_TRUSTED_FILE_OWNER + if ((cfp = fopen(cfile, "r")) == NULL) + { + fprintf(stderr, "mailstats: "); + perror(cfile); + exit(EX_NOINPUT); + } + while (fgets(buf, sizeof(buf), cfp) != NULL) + { + register char *b; + + if ((b = strchr(buf, '\n')) != NULL) + *b = '\0'; + + b = buf; + switch (*b++) + { + case 'O': /* option */ + if (strncasecmp(b, " TrustedFileOwner", 17) == 0 && + !(isascii(b[17]) && isalnum(b[17]))) + { + b = strchr(b, '='); + if (b == NULL) + continue; + while (isascii(*++b) && isspace(*b)) + continue; + if (isascii(*b) && isdigit(*b)) + TrustedFileUid = atoi(b); + else + { + register struct passwd *pw; + + TrustedFileUid = 0; + pw = getpwnam(b); + if (pw == NULL) + fprintf(stderr, + "TrustedFileOwner: unknown user %s", b); + else + TrustedFileUid = pw->pw_uid; + } + + # ifdef UID_MAX + if (TrustedFileUid > UID_MAX) + { + syserr("TrustedFileOwner: uid value (%ld) > UID_MAX (%ld)", + TrustedFileUid, UID_MAX); + TrustedFileUid = 0; + } + # endif + break; + } + + + default: + continue; + } + } + (void) fclose(cfp); + #endif switch (type) { case T_ERR: *************** *** 425,432 **** exit(EX_CONFIG); } if (dbp.dbm != NULL && ! (filechanged(dbuf, dbm_dirfno(dbp.dbm), &std, sff) || ! filechanged(pbuf, dbm_pagfno(dbp.dbm), &stp, sff))) { fprintf(stderr, "dbm map %s: file changed after open\n", --- 496,503 ---- exit(EX_CONFIG); } if (dbp.dbm != NULL && ! (filechanged(dbuf, dbm_dirfno(dbp.dbm), &std) || ! filechanged(pbuf, dbm_pagfno(dbp.dbm), &stp))) { fprintf(stderr, "dbm map %s: file changed after open\n", *************** *** 434,439 **** --- 505,521 ---- dbm_close(dbp.dbm); exit(EX_CANTCREAT); } + if (geteuid() == 0 && TrustedFileUid != 0) + { + if (fchown(dbm_dirfno(dbp.dbm), TrustedFileUid, -1) < 0 || + fchown(dbm_pagfno(dbp.dbm), TrustedFileUid, -1) < 0) + { + fprintf(stderr, + "WARNING: ownership change on %s failed: %s", + mapname, errstring(errno)); + } + } + break; #endif *************** *** 474,480 **** fd = -1; errno = dbp.db->fd(dbp.db, &fd); # endif ! if (filechanged(dbuf, fd, &std, sff)) { fprintf(stderr, "db map %s: file changed after open\n", --- 556,562 ---- fd = -1; errno = dbp.db->fd(dbp.db, &fd); # endif ! if (filechanged(dbuf, fd, &std)) { fprintf(stderr, "db map %s: file changed after open\n", *************** *** 487,492 **** --- 569,583 ---- exit(EX_CANTCREAT); } (void) (*dbp.db->sync)(dbp.db, 0); + if (geteuid() == 0 && TrustedFileUid != 0) + { + if (fchown(fd, TrustedFileUid, -1) < 0) + { + fprintf(stderr, + "WARNING: ownership change on %s failed: %s", + mapname, errstring(errno)); + } + } } break; *************** *** 524,530 **** fd = -1; errno = dbp.db->fd(dbp.db, &fd); # endif ! if (filechanged(dbuf, fd, &std, sff)) { fprintf(stderr, "db map %s: file changed after open\n", --- 615,621 ---- fd = -1; errno = dbp.db->fd(dbp.db, &fd); # endif ! if (filechanged(dbuf, fd, &std)) { fprintf(stderr, "db map %s: file changed after open\n", *************** *** 537,542 **** --- 628,642 ---- exit(EX_CANTCREAT); } (void) (*dbp.db->sync)(dbp.db, 0); + if (geteuid() == 0 && TrustedFileUid != 0) + { + if (fchown(fd, TrustedFileUid, -1) < 0) + { + fprintf(stderr, + "WARNING: ownership change on %s failed: %s", + mapname, errstring(errno)); + } + } } break; #endif Only in sendmail-8.9.0/praliases: Build diff -cr sendmail-8.9.0/praliases/Makefile.m4 sendmail-8.9.1/praliases/Makefile.m4 *** sendmail-8.9.0/praliases/Makefile.m4 Tue May 19 16:35:47 1998 --- sendmail-8.9.1/praliases/Makefile.m4 Thu Jun 4 14:27:19 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.12 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.15 (Berkeley) 6/4/98 # # C compiler *************** *** 57,77 **** BEFORE= confBEFORE OBJS= praliases.o ${OBJADD} - ALL= praliases praliases.0 - - all: ${ALL} - - praliases: ${BEFORE} ${OBJS} - ${CC} -o praliases ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - undivert(3) - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - praliases.0: praliases.8 - ${NROFF} ${MANDOC} praliases.8 > praliases.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') --- 57,65 ---- *************** *** 81,102 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: install-praliases install-docs install-praliases: praliases ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} praliases ${BINDIR} ! install-docs: praliases.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} praliases.${MAN8SRC} ${MAN8}/praliases.${MAN8EXT}') clean: ! rm -f ${OBJS} praliases praliases.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 69,102 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= praliases praliases.${MAN8SRC} + + all: ${ALL} + + praliases: ${BEFORE} ${OBJS} + ${CC} -o praliases ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + undivert(3) + + praliases.${MAN8SRC}: praliases.8 + ${NROFF} ${MANDOC} praliases.8 > praliases.${MAN8SRC} + install: install-praliases install-docs install-praliases: praliases ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} praliases ${BINDIR} ! install-docs: praliases.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} praliases.${MAN8SRC} ${MAN8}/praliases.${MAN8EXT}') clean: ! rm -f ${OBJS} praliases praliases.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', diff -cr sendmail-8.9.0/praliases/praliases.c sendmail-8.9.1/praliases/praliases.c *** sendmail-8.9.0/praliases/praliases.c Tue May 19 16:35:47 1998 --- sendmail-8.9.1/praliases/praliases.c Thu Jun 25 23:25:04 1998 *************** *** 17,23 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)praliases.c 8.16 (Berkeley) 5/19/98"; #endif /* not lint */ #if !defined(NDBM) && !defined(NEWDB) --- 17,23 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)praliases.c 8.17 (Berkeley) 6/25/98"; #endif /* not lint */ #if !defined(NDBM) && !defined(NEWDB) *************** *** 28,34 **** #ifdef NDBM # include #endif ! #define NOT_SENDMAIL #include #ifdef NEWDB # include --- 28,36 ---- #ifdef NDBM # include #endif ! #ifndef NOT_SENDMAIL ! # define NOT_SENDMAIL ! #endif #include #ifdef NEWDB # include Only in sendmail-8.9.0/rmail: Build diff -cr sendmail-8.9.0/rmail/Makefile.m4 sendmail-8.9.1/rmail/Makefile.m4 *** sendmail-8.9.0/rmail/Makefile.m4 Tue May 19 16:35:51 1998 --- sendmail-8.9.1/rmail/Makefile.m4 Thu Jun 18 10:47:53 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.12 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.16 (Berkeley) 6/18/98 # # C compiler *************** *** 50,73 **** BEFORE= snprintf.c confBEFORE OBJS= rmail.o snprintf.o ${OBJADD} - ALL= rmail rmail.0 - - all: ${ALL} - - rmail: ${BEFORE} ${OBJS} - ${CC} -o rmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - snprintf.c: ${SRCDIR}/snprintf.c - -ln -s ${SRCDIR}/snprintf.c snprintf.c - - undivert(3) - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - rmail.0: rmail.8 - ${NROFF} ${MANDOC} rmail.8 > rmail.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') --- 50,58 ---- *************** *** 77,98 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') ! install: install-rmail install-docs install-rmail: rmail ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} rmail ${BINDIR} ! install-docs: rmail.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} rmail.${MAN8SRC} ${MAN8}/rmail.${MAN8EXT}') clean: ! rm -f ${OBJS} rmail rmail.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 62,103 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') ! ALL= rmail rmail.${MAN8SRC} ! ! all: ${ALL} ! ! rmail: ${BEFORE} ${OBJS} ! ${CC} -o rmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} ! ! snprintf.c: ${SRCDIR}/snprintf.c ! -ln -s ${SRCDIR}/snprintf.c snprintf.c ! ! undivert(3) ! ! rmail.${MAN8SRC}: rmail.8 ! ${NROFF} ${MANDOC} rmail.8 > rmail.${MAN8SRC} ! ! install: ! @echo "NOTE: This version of rmail is not suited for some operating" ! @echo " systems. You can force the install using" ! @echo " '${MAKE} force-install'." ! ! force-install: install-rmail install-docs install-rmail: rmail ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} rmail ${BINDIR} ! install-docs: rmail.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} rmail.${MAN8SRC} ${MAN8}/rmail.${MAN8EXT}') clean: ! rm -f ${OBJS} rmail rmail.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', Only in sendmail-8.9.0/smrsh: Build diff -cr sendmail-8.9.0/smrsh/Makefile.m4 sendmail-8.9.1/smrsh/Makefile.m4 *** sendmail-8.9.0/smrsh/Makefile.m4 Tue May 19 16:35:57 1998 --- sendmail-8.9.1/smrsh/Makefile.m4 Thu Jun 4 14:27:22 1998 *************** *** 1,7 **** # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.10 (Berkeley) 5/13/98 # # C compiler --- 1,7 ---- # # This Makefile is designed to work on the old "make" program. # ! # @(#)Makefile.m4 8.13 (Berkeley) 6/4/98 # # C compiler *************** *** 48,69 **** BEFORE= confBEFORE OBJS= smrsh.o ${OBJADD} - ALL= smrsh smrsh.0 - - all: ${ALL} - - smrsh: ${BEFORE} ${OBJS} - ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - - undivert(3) - # Which *roff program has -mandoc support NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - smrsh.0: smrsh.8 - ${NROFF} ${MANDOC} smrsh.8 > smrsh.0 - INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') --- 48,57 ---- *************** *** 73,94 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: install-smrsh install-docs install-smrsh: smrsh ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${BINDIR} ! install-docs: smrsh.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} smrsh.${MAN8SRC} ${MAN8}/smrsh.${MAN8EXT}') clean: ! rm -f ${OBJS} smrsh smrsh.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', --- 61,94 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= smrsh smrsh.${MAN8SRC} + + all: ${ALL} + + smrsh: ${BEFORE} ${OBJS} + ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + undivert(3) + + smrsh.${MAN8SRC}: smrsh.8 + ${NROFF} ${MANDOC} smrsh.8 > smrsh.${MAN8SRC} + install: install-smrsh install-docs install-smrsh: smrsh ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${BINDIR} ! install-docs: smrsh.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} smrsh.${MAN8SRC} ${MAN8}/smrsh.${MAN8EXT}') clean: ! rm -f ${OBJS} smrsh smrsh.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', Only in sendmail-8.9.0/src: Build diff -cr sendmail-8.9.0/src/Makefile.m4 sendmail-8.9.1/src/Makefile.m4 *** sendmail-8.9.0/src/Makefile.m4 Tue May 19 16:36:11 1998 --- sendmail-8.9.1/src/Makefile.m4 Tue Jun 16 09:46:56 1998 *************** *** 2,8 **** # This Makefile is designed to work on any reasonably current version of # "make" program. # ! # @(#)Makefile.m4 8.19 (Berkeley) 5/13/98 # # C compiler --- 2,8 ---- # This Makefile is designed to work on any reasonably current version of # "make" program. # ! # @(#)Makefile.m4 8.23 (Berkeley) 6/16/98 # # C compiler *************** *** 74,108 **** safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \ sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD} - ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 - - all: ${ALL} - - sendmail: ${BEFORE} ${OBJS} - ${CC} -o sendmail ${LDOPTS} ${LIBDIRS} ${OBJS} ${LIBS} - - undivert(3) - - NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') - MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - - aliases.0: aliases.5 - ${NROFF} ${MANDOC} aliases.5 > aliases.0 - - mailq.0: mailq.1 - ${NROFF} ${MANDOC} mailq.1 > mailq.0 - - newaliases.0: newaliases.1 - ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 - - sendmail.0: sendmail.8 - ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 - LINKS= ifdef(`confLINKS', `confLINKS', `${UBINDIR}/newaliases \ ${UBINDIR}/mailq \ ${UBINDIR}/hoststat \ ${UBINDIR}/purgestat') INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confSBINOWN', `confSBINOWN', `root') BINGRP= ifdef(`confSBINGRP', `confSBINGRP', `kmem') --- 74,88 ---- safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \ sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD} LINKS= ifdef(`confLINKS', `confLINKS', `${UBINDIR}/newaliases \ ${UBINDIR}/mailq \ ${UBINDIR}/hoststat \ ${UBINDIR}/purgestat') + + NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') + MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') + INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') BINOWN= ifdef(`confSBINOWN', `confSBINOWN', `root') BINGRP= ifdef(`confSBINGRP', `confSBINGRP', `kmem') *************** *** 112,118 **** MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN1= ${MANROOT}ifdef(`confMAN1', `confMAN1', `1') MAN1EXT=ifdef(`confMAN1EXT', `confMAN1EXT', `1') MAN1SRC=ifdef(`confMAN1SRC', `confMAN1SRC', `0') --- 92,98 ---- MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') ! MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') MAN1= ${MANROOT}ifdef(`confMAN1', `confMAN1', `1') MAN1EXT=ifdef(`confMAN1EXT', `confMAN1EXT', `1') MAN1SRC=ifdef(`confMAN1SRC', `confMAN1SRC', `0') *************** *** 123,139 **** MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') install: install-sendmail install-docs install-sendmail: sendmail ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} - cp /dev/null sendmail.st ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \ ${STDIR}/sendmail.st ! install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} sendmail.${MAN8SRC} ${MAN8}/sendmail.${MAN8EXT} ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} aliases.${MAN5SRC} ${MAN5}/aliases.${MAN5EXT} --- 103,140 ---- MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') + ALL= sendmail aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC} + + all: ${ALL} + + sendmail: ${BEFORE} ${OBJS} + ${CC} -o sendmail ${LDOPTS} ${LIBDIRS} ${OBJS} ${LIBS} + cp /dev/null sendmail.st + + undivert(3) + + aliases.${MAN5SRC}: aliases.5 + ${NROFF} ${MANDOC} aliases.5 > aliases.${MAN5SRC} + + mailq.${MAN1SRC}: mailq.1 + ${NROFF} ${MANDOC} mailq.1 > mailq.${MAN1SRC} + + newaliases.${MAN1SRC}: newaliases.1 + ${NROFF} ${MANDOC} newaliases.1 > newaliases.${MAN1SRC} + + sendmail.${MAN8SRC}: sendmail.8 + ${NROFF} ${MANDOC} sendmail.8 > sendmail.${MAN8SRC} + install: install-sendmail install-docs install-sendmail: sendmail ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \ ${STDIR}/sendmail.st ! install-docs: aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC} ifdef(`confNO_MAN_INSTALL', `dnl', ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} sendmail.${MAN8SRC} ${MAN8}/sendmail.${MAN8EXT} ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} aliases.${MAN5SRC} ${MAN5}/aliases.${MAN5EXT} *************** *** 141,147 **** ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} newaliases.${MAN1SRC} ${MAN1}/newaliases.${MAN1EXT}') clean: ! rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', `generic').m4)dnl --- 142,148 ---- ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} newaliases.${MAN1SRC} ${MAN1}/newaliases.${MAN1EXT}') clean: ! rm -f ${OBJS} sendmail aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC} ################ Dependency scripts include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', `generic').m4)dnl diff -cr sendmail-8.9.0/src/README sendmail-8.9.1/src/README *** sendmail-8.9.0/src/README Tue May 19 16:36:01 1998 --- sendmail-8.9.1/src/README Tue Jun 30 23:08:37 1998 *************** *** 8,14 **** # the sendmail distribution. # # ! # @(#)README 8.198 (Berkeley) 5/19/98 # This directory contains the source files for sendmail(TM). --- 8,14 ---- # the sendmail distribution. # # ! # @(#)README 8.206 (Berkeley) 6/30/98 # This directory contains the source files for sendmail(TM). *************** *** 20,28 **** create an appropriate obj.* subdirectory so that multiplatform support works easily. ! ************************************************** ! ** Read below for more details of Makefiles. ** ! ************************************************** ************************************************************************** ** IMPORTANT: Read the appropriate paragraphs in the section on ** --- 20,28 ---- create an appropriate obj.* subdirectory so that multiplatform support works easily. ! ********************************************************** ! ** Read below for more details on building sendmail. ** ! ********************************************************** ************************************************************************** ** IMPORTANT: Read the appropriate paragraphs in the section on ** *************** *** 178,184 **** | COMPILE FLAGS | +---------------+ ! Whereever possible, I try to make sendmail pull in the correct compilation options needed to compile on various environments based on automatically defined symbols. Some machines don't seem to have useful symbols available, requiring that a compilation flag be defined in --- 178,184 ---- | COMPILE FLAGS | +---------------+ ! Wherever possible, I try to make sendmail pull in the correct compilation options needed to compile on various environments based on automatically defined symbols. Some machines don't seem to have useful symbols available, requiring that a compilation flag be defined in *************** *** 609,615 **** Up to 8.6, sendmail tried to find the sendmail.cf file in the same place as the vendors had put it, even when this was obviously stupid. As of 8.7, sendmail ALWAYS looks for /etc/sendmail.cf. ! Beginning the 8.10, sendmail will use /etc/mail/sendmail.cf. You can get sendmail to use the stupid vendor .cf location by adding -DUSE_VENDOR_CF_PATH during compilation, but this may break support programs and scripts that need to find sendmail.cf. You --- 609,615 ---- Up to 8.6, sendmail tried to find the sendmail.cf file in the same place as the vendors had put it, even when this was obviously stupid. As of 8.7, sendmail ALWAYS looks for /etc/sendmail.cf. ! Beginning with 8.10, sendmail will use /etc/mail/sendmail.cf. You can get sendmail to use the stupid vendor .cf location by adding -DUSE_VENDOR_CF_PATH during compilation, but this may break support programs and scripts that need to find sendmail.cf. You *************** *** 617,629 **** vendor location rather than changing the location in the sendmail binary. - ld: fatal: library -l44bsd: not found - Most of the Makefiles include -l44bsd in the LIBS= definition; - this is because several versions of BIND (4.9.0, 4.9.1, 4.9.2) - require this library. If you are running one of these versions, - install this library. Otherwise, just delete "-l44bsd" from the - LIBS= line in the Makefile. - SunOS 4.x (Solaris 1.x) You may have to use -lresolv on SunOS. However, beware that this links in a new version of gethostbyname that does not --- 617,622 ---- *************** *** 662,668 **** following changes: * Don't use /usr/5bin in your PATH, but make /usr/5bin/uname available as "uname" command. ! * Use the defines "-DBSD4_3 -DNAMED_BIND=0" in the BuildTools/OS/SunOS.4.0, which is selected via the "uname" command. I recommend to make available the db-library on the system first (and change the Makefile to use this library). --- 655,661 ---- following changes: * Don't use /usr/5bin in your PATH, but make /usr/5bin/uname available as "uname" command. ! * Use the defines "-DBSD4_3 -DNAMED_BIND=0" in BuildTools/OS/SunOS.4.0, which is selected via the "uname" command. I recommend to make available the db-library on the system first (and change the Makefile to use this library). *************** *** 687,693 **** using a web search engine. Solaris 2.x (SunOS 5.x) ! To compile for Solaris, the Makefile chosen by Build must include a SOLARIS definition which reflects the Solaris version (i.e. -DSOLARIS=20400 for 2.4 or -DSOLARIS=20501 for 2.5.1). If you are using gcc, make sure -I/usr/include is not used (or --- 680,686 ---- using a web search engine. Solaris 2.x (SunOS 5.x) ! To compile for Solaris, the Makefile built by Build must include a SOLARIS definition which reflects the Solaris version (i.e. -DSOLARIS=20400 for 2.4 or -DSOLARIS=20501 for 2.5.1). If you are using gcc, make sure -I/usr/include is not used (or *************** *** 995,1000 **** --- 988,996 ---- /etc/named.boot. - sigh - + According to SCO, the m4 which ships with UnixWare 2.1.2 is broken. + We recommend installing GNU m4 before attempting to build sendmail. + DG/UX Doug Anderson has successfully run V8 on the DG/UX 5.4.2 and 5.4R3.x platforms under heavy usage. *************** *** 1008,1014 **** Apollo DomainOS If you are compiling on Apollo, you will have to create an empty ! file "unistd.h" and create a file "dirent.h" containing: #include #define dirent direct --- 1004,1011 ---- Apollo DomainOS If you are compiling on Apollo, you will have to create an empty ! file "unistd.h" (for DomainOS 10.3 and earlier) and create a file ! "dirent.h" containing: #include #define dirent direct *************** *** 1041,1047 **** the flock() system call gives errors. If you are running .14, you must not use flock. You can do this with -DHASFLOCK=0. ! Around the inclusion of bind-4.9.3 & linux libc-4.6.20, the initialization of the _res structure changed. If /etc/hosts.conf was configured as "hosts, bind" the resolver code could return "Name server failure" errors. This is supposedly fixed in --- 1038,1044 ---- the flock() system call gives errors. If you are running .14, you must not use flock. You can do this with -DHASFLOCK=0. ! Around the inclusion of bind-4.9.3 & Linux libc-4.6.20, the initialization of the _res structure changed. If /etc/hosts.conf was configured as "hosts, bind" the resolver code could return "Name server failure" errors. This is supposedly fixed in *************** *** 1059,1078 **** of libc between 4.4.4 and 4.7.0 (snprintf improves security, so you want to use this if at all possible). ! NOTE ON LINUX & BIND: By default, the Makefiles for linux include ! header files in /usr/local/include and libraries in /usr/local/lib. ! If you've installed BIND on your system, the header files typically ! end up in the search path and you need to add "-lresolv" to the ! LIBS line in your Makefile. Really old versions may need to include ! "-l44bsd" as well (particularly if the link phase complains about ! missing strcasecmp, strncasecmp or strpbrk). Complaints about an ! undefined reference to `__dn_skipname' in domain.o are a sure sign ! that you need to add -lresolv to LIBS. Newer versions of linux ! are basically threaded BIND, so you may or may not see complaints ! if you accidentally mix BIND headers/libraries with virginal libc. ! If you have BIND headers in /usr/local/include (resolv.h, etc) ! you *should* be adding -lresolv to LIBS. Data structures may change ! and you'd be asking for a core dump. AIX 3.x This version of sendmail does not support MB, MG, and MR resource --- 1056,1076 ---- of libc between 4.4.4 and 4.7.0 (snprintf improves security, so you want to use this if at all possible). ! NOTE ON LINUX & BIND: By default, the Makefile generated for Linux ! includes header files in /usr/local/include and libraries in ! /usr/local/lib. If you've installed BIND on your system, the header ! files typically end up in the search path and you need to add ! "-lresolv" to the LIBS line in your Makefile. Really old versions ! may need to include "-l44bsd" as well (particularly if the link phase ! complains about missing strcasecmp, strncasecmp or strpbrk). ! Complaints about an undefined reference to `__dn_skipname' in ! domain.o are a sure sign that you need to add -lresolv to LIBS. ! Newer versions of Linux are basically threaded BIND, so you may or ! may not see complaints if you accidentally mix BIND ! headers/libraries with virginal libc. If you have BIND headers in ! /usr/local/include (resolv.h, etc) you *should* be adding -lresolv ! to LIBS. Data structures may change and you'd be asking for a ! core dump. AIX 3.x This version of sendmail does not support MB, MG, and MR resource *************** *** 1140,1150 **** on many files. You can ignore these. System V Release 4 Based Systems ! There is a single Makefile that is intended for all SVR4-based systems (built from BuildTools/OS/SVR4). It defines __svr4__, which is predefined by some compilers. If your compiler already defines this compile variable, you can delete the definition from ! the Makefile. It's been tested on Dell Issue 2.2. --- 1138,1149 ---- on many files. You can ignore these. System V Release 4 Based Systems ! There is a single BuildTools OS that is intended for all SVR4-based systems (built from BuildTools/OS/SVR4). It defines __svr4__, which is predefined by some compilers. If your compiler already defines this compile variable, you can delete the definition from ! the generated Makefile or create a BuildTools/Site/site.config.m4 ! file. It's been tested on Dell Issue 2.2. *************** *** 1208,1218 **** See sendmail/contrib/AmdahlUTS.patch for the patches necessary to get BIND 4.9 compiled for UTS. ! UnixWare 2.0 According to Alexander Kolbasov , the m4 on UnixWare 2.0 (still in Beta) will core dump on the config files. GNU m4 and the m4 from UnixWare 1.x both work. UNICOS 8.0.3.4 Some people have reported that the -O flag on UNICOS can cause problems. You may want to turn this off if you have problems --- 1207,1226 ---- See sendmail/contrib/AmdahlUTS.patch for the patches necessary to get BIND 4.9 compiled for UTS. ! UnixWare According to Alexander Kolbasov , the m4 on UnixWare 2.0 (still in Beta) will core dump on the config files. GNU m4 and the m4 from UnixWare 1.x both work. + According to Larry Rosenman : + + UnixWare 2.1.[23]'s m4 chokes (not obviously) when + processing the 8.9.0 cf files. + + I had a LOCAL_RULE_0 that wound up AFTER the + SBasic_check_rcpt rules using the SCO supplied M4. + GNU M4 works fine. + UNICOS 8.0.3.4 Some people have reported that the -O flag on UNICOS can cause problems. You may want to turn this off if you have problems *************** *** 1296,1304 **** TCP Wrappers If you are using -DTCPWRAPPERS to get TCP Wrappers support you will ! also need to install libwrap.a and modify the Makefile to include ! -lwrap in the LIBS line (make sure that INCDIRS and LIBDIRS point ! to where the tcpd.h and libwrap.a can be found). TCP Wrappers is available on ftp.win.tue.nl in /pub/security; grab tcp_wrappers_.tar.gz (where is the highest --- 1304,1313 ---- TCP Wrappers If you are using -DTCPWRAPPERS to get TCP Wrappers support you will ! also need to install libwrap.a and modify your site.config.m4 file ! or the generated Makefile to include -lwrap in the LIBS line ! (make sure that INCDIRS and LIBDIRS point to where the tcpd.h and ! libwrap.a can be found). TCP Wrappers is available on ftp.win.tue.nl in /pub/security; grab tcp_wrappers_.tar.gz (where is the highest *************** *** 1413,1418 **** --- 1422,1428 ---- when opening or creating files. savemail.c Routines which save the letter on processing errors. sendmail.h Main header file for sendmail. + snprintf.c Routines to manipulate strings but prevent buffer overflows. srvrsmtp.c Routines to implement server SMTP. stab.c Routines to manage the symbol table. stats.c Routines to collect and post the statistics. *************** *** 1429,1432 **** Eric Allman ! (Version 8.198, last update 5/19/98 15:08:25) --- 1439,1442 ---- Eric Allman ! (Version 8.206, last update 6/30/98 22:08:36) diff -cr sendmail-8.9.0/src/alias.c sendmail-8.9.1/src/alias.c *** sendmail-8.9.0/src/alias.c Tue May 19 16:36:09 1998 --- sendmail-8.9.1/src/alias.c Mon Jun 8 14:24:55 1998 *************** *** 13,19 **** # include "sendmail.h" #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.90 (Berkeley) 5/19/98"; #endif /* not lint */ --- 13,19 ---- # include "sendmail.h" #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.92 (Berkeley) 6/5/98"; #endif /* not lint */ *************** *** 101,111 **** a->q_flags |= QVERIFIED; return; } ! message("aliased to %s", shortenstring(p, 203)); if (LogLevel > 9) sm_syslog(LOG_INFO, e->e_id, "alias %.100s => %s", ! a->q_paddr, shortenstring(p, 203)); a->q_flags &= ~QSELFREF; if (tTd(27, 5)) { --- 101,111 ---- a->q_flags |= QVERIFIED; return; } ! message("aliased to %s", shortenstring(p, MAXSHORTSTR)); if (LogLevel > 9) sm_syslog(LOG_INFO, e->e_id, "alias %.100s => %s", ! a->q_paddr, shortenstring(p, MAXSHORTSTR)); a->q_flags &= ~QSELFREF; if (tTd(27, 5)) { *************** *** 380,386 **** if (stat(buf, &stb) < 0 || stb.st_mtime < mtime || attimeout) { /* database is out of date */ ! if (AutoRebuild && stb.st_ino != 0 && stb.st_uid == geteuid()) { bool oldSuprErrs; --- 380,388 ---- if (stat(buf, &stb) < 0 || stb.st_mtime < mtime || attimeout) { /* database is out of date */ ! if (AutoRebuild && stb.st_ino != 0 && ! (stb.st_uid == geteuid() || ! (geteuid() == 0 && stb.st_uid == TrustedFileUid))) { bool oldSuprErrs; diff -cr sendmail-8.9.0/src/clock.c sendmail-8.9.1/src/clock.c *** sendmail-8.9.0/src/clock.c Tue May 19 16:36:07 1998 --- sendmail-8.9.1/src/clock.c Thu Jun 4 14:51:31 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)clock.c 8.33 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)clock.c 8.34 (Berkeley) 6/4/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 158,163 **** --- 158,164 ---- ** calls the next function in EventQueue. */ + /* ARGSUSED */ static SIGFUNC_DECL tick(sig) int sig; diff -cr sendmail-8.9.0/src/collect.c sendmail-8.9.1/src/collect.c *** sendmail-8.9.0/src/collect.c Tue May 19 16:36:05 1998 --- sendmail-8.9.1/src/collect.c Thu Jun 4 14:32:01 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.87 (Berkeley) 5/19/98"; #endif /* not lint */ # include --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.89 (Berkeley) 6/4/98"; #endif /* not lint */ # include *************** *** 159,164 **** --- 159,166 ---- for (;;) { + extern int chompheader __P((char *, bool, HDR **, ENVELOPE *)); + if (tTd(30, 35)) printf("top, istate=%d, mstate=%d\n", istate, mstate); for (;;) *************** *** 311,318 **** istate, mstate, buf); switch (mstate) { - extern int chompheader __P((char *, bool, HDR **, ENVELOPE *)); - case MS_UFROM: mstate = MS_HEADER; #ifndef NOTUNIX --- 313,318 ---- *************** *** 354,360 **** --- 354,363 ---- bp++; *bp = '\0'; if (bitset(H_EOH, chompheader(buf, FALSE, hdrp, e))) + { mstate = MS_BODY; + goto nextstate; + } break; case MS_BODY: *************** *** 434,449 **** sm_syslog(LOG_NOTICE, e->e_id, "collect: %s on connection from %.100s, sender=%s: %s", problem, host, ! shortenstring(e->e_from.q_paddr, 203), errstring(errno)); if (feof(fp)) usrerr("451 collect: %s on connection from %s, from=%s", problem, host, ! shortenstring(e->e_from.q_paddr, 203)); else syserr("451 collect: %s on connection from %s, from=%s", problem, host, ! shortenstring(e->e_from.q_paddr, 203)); /* don't return an error indication */ e->e_to = NULL; --- 437,452 ---- sm_syslog(LOG_NOTICE, e->e_id, "collect: %s on connection from %.100s, sender=%s: %s", problem, host, ! shortenstring(e->e_from.q_paddr, MAXSHORTSTR), errstring(errno)); if (feof(fp)) usrerr("451 collect: %s on connection from %s, from=%s", problem, host, ! shortenstring(e->e_from.q_paddr, MAXSHORTSTR)); else syserr("451 collect: %s on connection from %s, from=%s", problem, host, ! shortenstring(e->e_from.q_paddr, MAXSHORTSTR)); /* don't return an error indication */ e->e_to = NULL; diff -cr sendmail-8.9.0/src/conf.c sendmail-8.9.1/src/conf.c *** sendmail-8.9.0/src/conf.c Tue May 19 16:36:09 1998 --- sendmail-8.9.1/src/conf.c Thu Jun 25 23:09:42 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.428 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.431 (Berkeley) 6/25/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 247,252 **** --- 247,253 ---- DefGid = 1; /* option g */ setdefuser(); } + TrustedFileUid = 0; if (tTd(37, 4)) printf("setdefaults: DefUser=%s, DefUid=%d, DefGid=%d\n", DefUser != NULL ? DefUser : "<1:1>", *************** *** 889,928 **** } #endif /* if the service file doesn't work, use an absolute fallback */ ! #ifdef _USE_DEC_SVC_CONF_ punt: ! #endif for (svcno = 0; svcno < MAXMAPACTIONS; svcno++) mapreturn[svcno] = 0; svcno = 0; if (strcmp(service, "aliases") == 0) { maptype[svcno++] = "files"; ! #ifdef AUTO_NIS_ALIASES ! # ifdef NISPLUS maptype[svcno++] = "nisplus"; ! # endif ! # ifdef NIS maptype[svcno++] = "nis"; # endif - #endif return svcno; } if (strcmp(service, "hosts") == 0) { ! # if NAMED_BIND maptype[svcno++] = "dns"; ! # else ! # if defined(sun) && !defined(BSD) && !defined(_USE_SUN_NSSWITCH_) /* SunOS */ maptype[svcno++] = "nis"; # endif - # endif maptype[svcno++] = "files"; return svcno; } return -1; } /* ** USERNAME -- return the user id of the logged in user. --- 890,931 ---- } #endif + #if !defined(_USE_SUN_NSSWITCH_) /* if the service file doesn't work, use an absolute fallback */ ! # ifdef _USE_DEC_SVC_CONF_ punt: ! # endif for (svcno = 0; svcno < MAXMAPACTIONS; svcno++) mapreturn[svcno] = 0; svcno = 0; if (strcmp(service, "aliases") == 0) { maptype[svcno++] = "files"; ! # ifdef AUTO_NIS_ALIASES ! # ifdef NISPLUS maptype[svcno++] = "nisplus"; ! # endif ! # ifdef NIS maptype[svcno++] = "nis"; + # endif # endif return svcno; } if (strcmp(service, "hosts") == 0) { ! # if NAMED_BIND maptype[svcno++] = "dns"; ! # else ! # if defined(sun) && !defined(BSD) /* SunOS */ maptype[svcno++] = "nis"; + # endif # endif maptype[svcno++] = "files"; return svcno; } return -1; + #endif } /* ** USERNAME -- return the user id of the logged in user. diff -cr sendmail-8.9.0/src/conf.h sendmail-8.9.1/src/conf.h *** sendmail-8.9.0/src/conf.h Tue May 19 16:36:04 1998 --- sendmail-8.9.1/src/conf.h Thu Jun 4 14:32:01 1998 *************** *** 9,15 **** * the sendmail distribution. * * ! * @(#)conf.h 8.371 (Berkeley) 5/19/98 */ /* --- 9,15 ---- * the sendmail distribution. * * ! * @(#)conf.h 8.372 (Berkeley) 6/4/98 */ /* *************** *** 63,68 **** --- 63,69 ---- # define MAXQFNAME 20 /* max qf file name length */ # define MACBUFSIZE 4096 /* max expanded macro buffer size */ # define TOBUFSIZE 512 /* max buffer to hold address list */ + # define MAXSHORTSTR 203 /* max short string length */ /********************************************************************** ** Compilation options. diff -cr sendmail-8.9.0/src/daemon.c sendmail-8.9.1/src/daemon.c *** sendmail-8.9.0/src/daemon.c Tue May 19 16:36:06 1998 --- sendmail-8.9.1/src/daemon.c Wed Jun 24 11:28:42 1998 *************** *** 15,23 **** #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.217 (Berkeley) 5/19/98 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.217 (Berkeley) 5/19/98 (without daemon mode)"; #endif #endif /* not lint */ --- 15,23 ---- #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.220 (Berkeley) 6/24/98 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.220 (Berkeley) 6/24/98 (without daemon mode)"; #endif #endif /* not lint */ *************** *** 402,408 **** (outchannel = fdopen(t, "w")) == NULL) { syserr("cannot open SMTP server channel, fd=%d", t); ! exit(0); } InChannel = inchannel; --- 402,408 ---- (outchannel = fdopen(t, "w")) == NULL) { syserr("cannot open SMTP server channel, fd=%d", t); ! exit(EX_OK); } InChannel = inchannel; *************** *** 416,422 **** if (!xla_host_ok(RealHostName)) { message("421 Too many SMTP sessions for this host"); ! exit(0); } #endif --- 416,422 ---- if (!xla_host_ok(RealHostName)) { message("421 Too many SMTP sessions for this host"); ! exit(EX_OK); } #endif *************** *** 888,893 **** --- 888,900 ---- #endif default: + if (hp->h_length > sizeof addr.sa.sa_data) + { + syserr("makeconnection: long sa_data: family %d len %d", + hp->h_addrtype, hp->h_length); + mci_setstat(mci, EX_NOHOST, "5.1.2", NULL); + return EX_NOHOST; + } bcopy(hp->h_addr, addr.sa.sa_data, hp->h_length); *************** *** 2046,2052 **** _res.retry = saveretry; #endif /* NAMED_BIND */ ! if (hp != NULL && hp->h_name[0] != '[' && inet_addr(hp->h_name) == -1) return denlstring((char *) hp->h_name, TRUE, TRUE); #if NETUNIX else if (sap->sa.sa_family == AF_UNIX && sap->sunix.sun_path[0] == '\0') --- 2053,2060 ---- _res.retry = saveretry; #endif /* NAMED_BIND */ ! if (hp != NULL && hp->h_name[0] != '[' && ! inet_addr(hp->h_name) == INADDR_NONE) return denlstring((char *) hp->h_name, TRUE, TRUE); #if NETUNIX else if (sap->sa.sa_family == AF_UNIX && sap->sunix.sun_path[0] == '\0') diff -cr sendmail-8.9.0/src/deliver.c sendmail-8.9.1/src/deliver.c *** sendmail-8.9.0/src/deliver.c Tue May 19 16:36:08 1998 --- sendmail-8.9.1/src/deliver.c Tue Jun 30 23:05:35 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.349 (Berkeley) 5/19/98"; #endif /* not lint */ #include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.353 (Berkeley) 6/30/98"; #endif /* not lint */ #include "sendmail.h" *************** *** 942,948 **** p = remotename(p, m, RF_SENDERADDR|RF_CANONICAL, &rcode, e); if (strlen(p) >= (SIZE_T) sizeof rpathbuf) { ! p = shortenstring(p, 203); syserr("remotename: huge return %s", p); } snprintf(rpathbuf, sizeof rpathbuf, "%s", p); --- 942,948 ---- p = remotename(p, m, RF_SENDERADDR|RF_CANONICAL, &rcode, e); if (strlen(p) >= (SIZE_T) sizeof rpathbuf) { ! p = shortenstring(p, MAXSHORTSTR); syserr("remotename: huge return %s", p); } snprintf(rpathbuf, sizeof rpathbuf, "%s", p); *************** *** 1073,1079 **** if (m->m_maxsize != 0 && e->e_msgsize > m->m_maxsize) { e->e_flags |= EF_NO_BODY_RETN; ! to->q_status = "5.2.3"; usrerr("552 Message is too large; %ld bytes max", m->m_maxsize); markfailure(e, to, NULL, EX_UNAVAILABLE); giveresponse(EX_UNAVAILABLE, m, NULL, ctladdr, xstart, e); --- 1073,1082 ---- if (m->m_maxsize != 0 && e->e_msgsize > m->m_maxsize) { e->e_flags |= EF_NO_BODY_RETN; ! if (bitnset(M_LOCALMAILER, to->q_mailer->m_flags)) ! to->q_status = "5.2.3"; ! else ! to->q_status = "5.3.4"; usrerr("552 Message is too large; %ld bytes max", m->m_maxsize); markfailure(e, to, NULL, EX_UNAVAILABLE); giveresponse(EX_UNAVAILABLE, m, NULL, ctladdr, xstart, e); *************** *** 1275,1281 **** /* make absolutely certain 0, 1, and 2 are in use */ snprintf(wbuf, sizeof wbuf, "%s... openmailer(%s)", ! shortenstring(e->e_to, 203), m->m_name); checkfd012(wbuf); } #endif --- 1278,1284 ---- /* make absolutely certain 0, 1, and 2 are in use */ snprintf(wbuf, sizeof wbuf, "%s... openmailer(%s)", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name); checkfd012(wbuf); } #endif *************** *** 1506,1512 **** if (pipe(mpvect) < 0) { syserr("%s... openmailer(%s): pipe (to mailer)", ! shortenstring(e->e_to, 203), m->m_name); if (tTd(11, 1)) printf("openmailer: NULL\n"); rcode = EX_OSERR; --- 1509,1515 ---- if (pipe(mpvect) < 0) { syserr("%s... openmailer(%s): pipe (to mailer)", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name); if (tTd(11, 1)) printf("openmailer: NULL\n"); rcode = EX_OSERR; *************** *** 1518,1524 **** if (mpvect[0] < 3 || mpvect[1] < 3) { syserr("%s... openmailer(%s): bogus mpvect %d %d", ! shortenstring(e->e_to, 203), m->m_name, mpvect[0], mpvect[1]); printopenfds(TRUE); if (tTd(11, 1)) --- 1521,1527 ---- if (mpvect[0] < 3 || mpvect[1] < 3) { syserr("%s... openmailer(%s): bogus mpvect %d %d", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name, mpvect[0], mpvect[1]); printopenfds(TRUE); if (tTd(11, 1)) *************** *** 1537,1548 **** { if (e->e_lockfp == NULL) syserr("%s... openmailer(%s): overlapping mpvect %d %d", ! shortenstring(e->e_to, 203), m->m_name, ! mpvect[0], mpvect[1]); else syserr("%s... openmailer(%s): overlapping mpvect %d %d, lockfp = %d", ! shortenstring(e->e_to, 203), m->m_name, ! mpvect[0], mpvect[1], fileno(e->e_lockfp)); } #endif --- 1540,1552 ---- { if (e->e_lockfp == NULL) syserr("%s... openmailer(%s): overlapping mpvect %d %d", ! shortenstring(e->e_to, MAXSHORTSTR), ! m->m_name, mpvect[0], mpvect[1]); else syserr("%s... openmailer(%s): overlapping mpvect %d %d, lockfp = %d", ! shortenstring(e->e_to, MAXSHORTSTR), ! m->m_name, mpvect[0], mpvect[1], ! fileno(e->e_lockfp)); } #endif *************** *** 1553,1559 **** if (pipe(rpvect) < 0) { syserr("%s... openmailer(%s): pipe (from mailer)", ! shortenstring(e->e_to, 203), m->m_name); (void) close(mpvect[0]); (void) close(mpvect[1]); if (tTd(11, 1)) --- 1557,1564 ---- if (pipe(rpvect) < 0) { syserr("%s... openmailer(%s): pipe (from mailer)", ! shortenstring(e->e_to, MAXSHORTSTR), ! m->m_name); (void) close(mpvect[0]); (void) close(mpvect[1]); if (tTd(11, 1)) *************** *** 1586,1592 **** { /* failure */ syserr("%s... openmailer(%s): cannot fork", ! shortenstring(e->e_to, 203), m->m_name); (void) close(mpvect[0]); (void) close(mpvect[1]); #if SMTP --- 1591,1597 ---- { /* failure */ syserr("%s... openmailer(%s): cannot fork", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name); (void) close(mpvect[0]); (void) close(mpvect[1]); #if SMTP *************** *** 1772,1778 **** if (dup2(rpvect[1], STDOUT_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup pipe %d for stdout", ! shortenstring(e->e_to, 203), m->m_name, rpvect[1]); _exit(EX_OSERR); } --- 1777,1783 ---- if (dup2(rpvect[1], STDOUT_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup pipe %d for stdout", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name, rpvect[1]); _exit(EX_OSERR); } *************** *** 1784,1790 **** if (dup2(fileno(e->e_xfp), STDOUT_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup xscript %d for stdout", ! shortenstring(e->e_to, 203), m->m_name, fileno(e->e_xfp)); _exit(EX_OSERR); } --- 1789,1795 ---- if (dup2(fileno(e->e_xfp), STDOUT_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup xscript %d for stdout", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name, fileno(e->e_xfp)); _exit(EX_OSERR); } *************** *** 1793,1799 **** if (dup2(STDOUT_FILENO, STDERR_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup stdout for stderr", ! shortenstring(e->e_to, 203), m->m_name); _exit(EX_OSERR); } --- 1798,1805 ---- if (dup2(STDOUT_FILENO, STDERR_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup stdout for stderr", ! shortenstring(e->e_to, MAXSHORTSTR), ! m->m_name); _exit(EX_OSERR); } *************** *** 1802,1808 **** if (dup2(mpvect[0], STDIN_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup pipe %d for stdin", ! shortenstring(e->e_to, 203), m->m_name, mpvect[0]); _exit(EX_OSERR); } --- 1808,1814 ---- if (dup2(mpvect[0], STDIN_FILENO) < 0) { syserr("%s... openmailer(%s): cannot dup pipe %d for stdin", ! shortenstring(e->e_to, MAXSHORTSTR), m->m_name, mpvect[0]); _exit(EX_OSERR); } *************** *** 2186,2192 **** /* make absolutely certain 0, 1, and 2 are in use */ snprintf(wbuf, sizeof wbuf, "%s... end of deliver(%s)", e->e_to == NULL ? "NO-TO-LIST" ! : shortenstring(e->e_to, 203), m->m_name); checkfd012(wbuf); } --- 2192,2198 ---- /* make absolutely certain 0, 1, and 2 are in use */ snprintf(wbuf, sizeof wbuf, "%s... end of deliver(%s)", e->e_to == NULL ? "NO-TO-LIST" ! : shortenstring(e->e_to, MAXSHORTSTR), m->m_name); checkfd012(wbuf); } *************** *** 3406,3412 **** /* set group id list (needs /etc/group access) */ if (RealUserName != NULL && !DontInitGroups) { ! if (initgroups(RealUserName, RealGid) == -1) syserr("mailfile: initgroups(%s, %d) failed", RealUserName, RealGid); } --- 3412,3418 ---- /* set group id list (needs /etc/group access) */ if (RealUserName != NULL && !DontInitGroups) { ! if (initgroups(RealUserName, RealGid) == -1 && suidwarn) syserr("mailfile: initgroups(%s, %d) failed", RealUserName, RealGid); } *************** *** 3415,3421 **** GIDSET_T gidset[1]; gidset[0] = RealGid; ! if (setgroups(1, gidset) == -1) syserr("mailfile: setgroups() failed"); } --- 3421,3427 ---- GIDSET_T gidset[1]; gidset[0] = RealGid; ! if (setgroups(1, gidset) == -1 && suidwarn) syserr("mailfile: setgroups() failed"); } *************** *** 3477,3486 **** if (f == NULL) { message("554 cannot open %s: %s", ! shortenstring(filename, 203), errstring(errno)); exit(EX_CANTCREAT); } ! if (filechanged(filename, fileno(f), &stb, sfflags)) { message("554 file changed after open"); exit(EX_CANTCREAT); --- 3483,3493 ---- if (f == NULL) { message("554 cannot open %s: %s", ! shortenstring(filename, MAXSHORTSTR), ! errstring(errno)); exit(EX_CANTCREAT); } ! if (filechanged(filename, fileno(f), &stb)) { message("554 file changed after open"); exit(EX_CANTCREAT); diff -cr sendmail-8.9.0/src/domain.c sendmail-8.9.1/src/domain.c *** sendmail-8.9.0/src/domain.c Tue May 19 16:36:04 1998 --- sendmail-8.9.1/src/domain.c Mon Jun 15 21:08:45 1998 *************** *** 14,22 **** #ifndef lint #if NAMED_BIND ! static char sccsid[] = "@(#)domain.c 8.75 (Berkeley) 5/19/98 (with name server)"; #else ! static char sccsid[] = "@(#)domain.c 8.75 (Berkeley) 5/19/98 (without name server)"; #endif #endif /* not lint */ --- 14,22 ---- #ifndef lint #if NAMED_BIND ! static char sccsid[] = "@(#)domain.c 8.77 (Berkeley) 6/4/98 (with name server)"; #else ! static char sccsid[] = "@(#)domain.c 8.77 (Berkeley) 6/4/98 (without name server)"; #endif #endif /* not lint */ *************** *** 332,338 **** if (strlen(host) >= (SIZE_T) sizeof MXHostBuf) { *rcode = EX_CONFIG; ! syserr("Host name %s too long", shortenstring(host, 203)); return -1; } snprintf(MXHostBuf, sizeof MXHostBuf, "%s", host); --- 332,339 ---- if (strlen(host) >= (SIZE_T) sizeof MXHostBuf) { *rcode = EX_CONFIG; ! syserr("Host name %s too long", ! shortenstring(host, MAXSHORTSTR)); return -1; } snprintf(MXHostBuf, sizeof MXHostBuf, "%s", host); *************** *** 436,441 **** --- 437,443 ---- ** to generalize it at the moment. */ + /* ARGSUSED3 */ char * bestmx_map_lookup(map, name, av, statp) MAP *map; diff -cr sendmail-8.9.0/src/envelope.c sendmail-8.9.1/src/envelope.c *** sendmail-8.9.0/src/envelope.c Tue May 19 16:36:03 1998 --- sendmail-8.9.1/src/envelope.c Thu Jun 4 14:51:30 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.115 (Berkeley) 5/19/98"; #endif /* not lint */ #include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.117 (Berkeley) 6/4/98"; #endif /* not lint */ #include "sendmail.h" *************** *** 436,443 **** #ifdef TTYNAME static char ybuf[60]; /* holds tty id */ register char *p; - #endif /* TTYNAME */ extern char *ttyname(); extern void settime __P((ENVELOPE *)); /* --- 436,443 ---- #ifdef TTYNAME static char ybuf[60]; /* holds tty id */ register char *p; extern char *ttyname(); + #endif /* TTYNAME */ extern void settime __P((ENVELOPE *)); /* *************** *** 826,832 **** if (LogLevel > 2) sm_syslog(LOG_NOTICE, e->e_id, "cannot prescan from (%s)", ! shortenstring(from, 203)); finis(); } (void) rewrite(pvp, 3, 0, e); --- 826,832 ---- if (LogLevel > 2) sm_syslog(LOG_NOTICE, e->e_id, "cannot prescan from (%s)", ! shortenstring(from, MAXSHORTSTR)); finis(); } (void) rewrite(pvp, 3, 0, e); diff -cr sendmail-8.9.0/src/err.c sendmail-8.9.1/src/err.c *** sendmail-8.9.0/src/err.c Tue May 19 16:36:05 1998 --- sendmail-8.9.1/src/err.c Thu Jun 4 14:32:01 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)err.c 8.73 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)err.c 8.74 (Berkeley) 6/4/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 434,440 **** sm_syslog(LOG_CRIT, CurEnv->e_id, "SYSERR: putoutmsg (%s): error on output channel sending \"%s\": %s", CurHostName == NULL ? "NO-HOST" : CurHostName, ! shortenstring(msg, 203), errstring(errno)); } /* ** PUTERRMSG -- like putoutmsg, but does special processing for error messages --- 434,440 ---- sm_syslog(LOG_CRIT, CurEnv->e_id, "SYSERR: putoutmsg (%s): error on output channel sending \"%s\": %s", CurHostName == NULL ? "NO-HOST" : CurHostName, ! shortenstring(msg, MAXSHORTSTR), errstring(errno)); } /* ** PUTERRMSG -- like putoutmsg, but does special processing for error messages *************** *** 541,547 **** strncmp(num, "251", 3) != 0) { (void) snprintf(eb, spaceleft, "%s... ", ! shortenstring(to, 203)); spaceleft -= strlen(eb); while (*eb != '\0') *eb++ &= 0177; --- 541,547 ---- strncmp(num, "251", 3) != 0) { (void) snprintf(eb, spaceleft, "%s... ", ! shortenstring(to, MAXSHORTSTR)); spaceleft -= strlen(eb); while (*eb != '\0') *eb++ &= 0177; *************** *** 658,664 **** bp += strlen(bp); } snprintf(bp, SPACELEFT(buf, bp), "%s", ! shortenstring(CurHostName, 203)); bp += strlen(buf); } if (SmtpPhase != NULL) --- 658,664 ---- bp += strlen(bp); } snprintf(bp, SPACELEFT(buf, bp), "%s", ! shortenstring(CurHostName, MAXSHORTSTR)); bp += strlen(buf); } if (SmtpPhase != NULL) *************** *** 672,685 **** if (CurHostName == NULL) break; (void) snprintf(buf, sizeof buf, "Host %s is down", ! shortenstring(CurHostName, 203)); return (buf); case ECONNREFUSED: if (CurHostName == NULL) break; (void) snprintf(buf, sizeof buf, "Connection refused by %s", ! shortenstring(CurHostName, 203)); return (buf); # endif --- 672,685 ---- if (CurHostName == NULL) break; (void) snprintf(buf, sizeof buf, "Host %s is down", ! shortenstring(CurHostName, MAXSHORTSTR)); return (buf); case ECONNREFUSED: if (CurHostName == NULL) break; (void) snprintf(buf, sizeof buf, "Connection refused by %s", ! shortenstring(CurHostName, MAXSHORTSTR)); return (buf); # endif *************** *** 748,754 **** if (CurHostName != NULL) { snprintf(bp, SPACELEFT(buf, bp), "%s: ", ! shortenstring(CurHostName, 203)); bp += strlen(bp); } snprintf(bp, SPACELEFT(buf, bp), "%s", dnsmsg); --- 748,754 ---- if (CurHostName != NULL) { snprintf(bp, SPACELEFT(buf, bp), "%s: ", ! shortenstring(CurHostName, MAXSHORTSTR)); bp += strlen(bp); } snprintf(bp, SPACELEFT(buf, bp), "%s", dnsmsg); diff -cr sendmail-8.9.0/src/headers.c sendmail-8.9.1/src/headers.c *** sendmail-8.9.0/src/headers.c Tue May 19 16:36:02 1998 --- sendmail-8.9.1/src/headers.c Thu Jun 4 11:12:45 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.126 (Berkeley) 5/19/98"; #endif /* not lint */ # include --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.127 (Berkeley) 6/4/98"; #endif /* not lint */ # include *************** *** 182,188 **** (void) sendtolist(fvalue, NULLADDR, &e->e_errorqueue, 0, e); /* if this means "end of header" quit now */ ! if (bitset(H_EOH, hi->hi_flags)) return hi->hi_flags; /* --- 182,188 ---- (void) sendtolist(fvalue, NULLADDR, &e->e_errorqueue, 0, e); /* if this means "end of header" quit now */ ! if (!headeronly && bitset(H_EOH, hi->hi_flags)) return hi->hi_flags; /* *************** *** 254,259 **** --- 254,263 ---- bcopy((char *) mopts, (char *) h->h_mflags, sizeof mopts); *hp = h; h->h_flags = hi->hi_flags; + + /* strip EOH flag if parsing MIME headers */ + if (headeronly) + h->h_flags &= ~H_EOH; if (def) h->h_flags |= H_DEFAULT; if (cond) diff -cr sendmail-8.9.0/src/main.c sendmail-8.9.1/src/main.c *** sendmail-8.9.0/src/main.c Tue May 19 16:36:03 1998 --- sendmail-8.9.1/src/main.c Mon Jun 8 14:57:04 1998 *************** *** 19,25 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.300 (Berkeley) 5/19/98"; #endif /* not lint */ #define _DEFINE --- 19,25 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.302 (Berkeley) 6/4/98"; #endif /* not lint */ #define _DEFINE *************** *** 1402,1408 **** if (i < 0) syserr("daemon: cannot fork"); if (i != 0) ! exit(0); /* disconnect from our controlling tty */ disconnect(2, CurEnv); --- 1402,1408 ---- if (i < 0) syserr("daemon: cannot fork"); if (i != 0) ! exit(EX_OK); /* disconnect from our controlling tty */ disconnect(2, CurEnv); *************** *** 1621,1626 **** --- 1621,1627 ---- } + /* ARGSUSED */ SIGFUNC_DECL intindebug(sig) int sig; *************** *** 1709,1714 **** --- 1710,1716 ---- ** Unlocks the current job. */ + /* ARGSUSED */ SIGFUNC_DECL intsig(sig) int sig; *************** *** 2136,2141 **** --- 2138,2144 ---- } + /* ARGSUSED */ SIGFUNC_DECL sigusr1(sig) int sig; *************** *** 2145,2150 **** --- 2148,2154 ---- } + /* ARGSUSED */ SIGFUNC_DECL sighup(sig) int sig; Only in sendmail-8.9.0/src: makesendmail diff -cr sendmail-8.9.0/src/map.c sendmail-8.9.1/src/map.c *** sendmail-8.9.0/src/map.c Tue May 19 16:36:10 1998 --- sendmail-8.9.1/src/map.c Fri Jun 5 14:51:02 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.236 (Berkeley) 5/19/98"; #endif /* not lint */ #include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.239 (Berkeley) 6/5/98"; #endif /* not lint */ #include "sendmail.h" *************** *** 921,928 **** return FALSE; } ! if (filechanged(dirfile, dfd, &std, sff) || ! filechanged(pagfile, pfd, &stp, sff)) { int save_errno = errno; --- 921,928 ---- return FALSE; } ! if (filechanged(dirfile, dfd, &std) || ! filechanged(pagfile, pfd, &stp)) { int save_errno = errno; *************** *** 953,958 **** --- 953,972 ---- else { map->map_mflags |= MF_LOCKED; + if (geteuid() == 0 && TrustedFileUid != 0) + { + if (fchown(dfd, TrustedFileUid, -1) < 0 || + fchown(pfd, TrustedFileUid, -1) < 0) + { + int err = errno; + + sm_syslog(LOG_ALERT, NOQID, + "ownership change on %s failed: %s", + map->map_file, errstring(err)); + message("050 ownership change on %s failed: %s", + map->map_file, errstring(err)); + } + } } if (fstat(dfd, &st) >= 0) map->map_mtime = st.st_mtime; *************** *** 1102,1108 **** auto int xstat; datum old; ! old.dptr = ndbm_map_lookup(map, key.dptr, NULL, &xstat); if (old.dptr != NULL && *(char *) old.dptr != '\0') { old.dsize = strlen(old.dptr); --- 1116,1123 ---- auto int xstat; datum old; ! old.dptr = ndbm_map_lookup(map, key.dptr, ! (char **)NULL, &xstat); if (old.dptr != NULL && *(char *) old.dptr != '\0') { old.dsize = strlen(old.dptr); *************** *** 1374,1380 **** } /* make sure no baddies slipped in just before the open... */ ! if (filechanged(buf, fd, &st, sff)) { int save_errno = errno; --- 1389,1395 ---- } /* make sure no baddies slipped in just before the open... */ ! if (filechanged(buf, fd, &st)) { int save_errno = errno; *************** *** 1454,1460 **** fd = -1; errno = db->fd(db, &fd); #endif ! if (filechanged(buf, fd, &st, sff)) { int save_errno = errno; --- 1469,1475 ---- fd = -1; errno = db->fd(db, &fd); #endif ! if (filechanged(buf, fd, &st)) { int save_errno = errno; *************** *** 1483,1489 **** --- 1498,1519 ---- /* try to make sure that at least the database header is on disk */ if (mode == O_RDWR) + { (void) db->sync(db, 0); + if (geteuid() == 0 && TrustedFileUid != 0) + { + if (fchown(fd, TrustedFileUid, -1) < 0) + { + int err = errno; + + sm_syslog(LOG_ALERT, NOQID, + "ownership change on %s failed: %s", + buf, errstring(err)); + message("050 ownership change on %s failed: %s", + buf, errstring(err)); + } + } + } if (fd >= 0 && fstat(fd, &st) >= 0) map->map_mtime = st.st_mtime; *************** *** 1725,1731 **** bzero(&old, sizeof old); ! old.data = db_map_lookup(map, key.data, NULL, &stat); if (old.data != NULL) { old.size = strlen(old.data); --- 1755,1762 ---- bzero(&old, sizeof old); ! old.data = db_map_lookup(map, key.data, ! (char **)NULL, &stat); if (old.data != NULL) { old.size = strlen(old.data); *************** *** 1895,1900 **** --- 1926,1932 ---- ** NIS_MAP_LOOKUP -- look up a datum in a NIS map */ + /* ARGSUSED3 */ char * nis_map_lookup(map, name, av, statp) MAP *map; *************** *** 3887,3892 **** --- 3919,3925 ---- ** STAB_MAP_LOOKUP -- look up alias in symbol table */ + /* ARGSUSED2 */ char * stab_map_lookup(map, name, av, pstat) register MAP *map; *************** *** 4172,4177 **** --- 4205,4211 ---- ** USER_MAP_LOOKUP -- look up a user in the passwd file. */ + /* ARGSUSED3 */ char * user_map_lookup(map, key, av, statp) MAP *map; *************** *** 4601,4606 **** --- 4635,4641 ---- ** NULL stubs */ + /* ARGSUSED */ bool null_map_open(map, mode) MAP *map; *************** *** 4609,4614 **** --- 4644,4650 ---- return TRUE; } + /* ARGSUSED */ void null_map_close(map) MAP *map; *************** *** 4627,4632 **** --- 4663,4669 ---- return NULL; } + /* ARGSUSED */ void null_map_store(map, key, val) MAP *map; diff -cr sendmail-8.9.0/src/mci.c sendmail-8.9.1/src/mci.c *** sendmail-8.9.0/src/mci.c Tue May 19 16:36:10 1998 --- sendmail-8.9.1/src/mci.c Mon Jun 15 11:03:17 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)mci.c 8.81 (Berkeley) 5/19/98"; #endif /* not lint */ #include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)mci.c 8.82 (Berkeley) 6/15/98"; #endif /* not lint */ #include "sendmail.h" *************** *** 805,811 **** return 0; default: ! syserr("Unknown host status line \"%s\"", buf); LineNumber = saveLineNumber; return -1; } --- 805,814 ---- return 0; default: ! sm_syslog(LOG_CRIT, NOQID, ! "%s: line %d: Unknown host status line \"%s\"", ! FileName == NULL ? mci->mci_host : FileName, ! LineNumber, buf); LineNumber = saveLineNumber; return -1; } diff -cr sendmail-8.9.0/src/parseaddr.c sendmail-8.9.1/src/parseaddr.c *** sendmail-8.9.0/src/parseaddr.c Tue May 19 16:36:04 1998 --- sendmail-8.9.1/src/parseaddr.c Wed Jun 24 15:07:53 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)parseaddr.c 8.150 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)parseaddr.c 8.153 (Berkeley) 6/24/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 1066,1072 **** char *mval = macvalue(rp[1], e); char **xpvp; int trsize = 0; ! char pvpb1[MAXATOM + 1]; char pvpbuf[PSBUFSIZE]; if (tTd(21, 2)) --- 1066,1073 ---- char *mval = macvalue(rp[1], e); char **xpvp; int trsize = 0; ! static size_t pvpb1_size = 0; ! static char **pvpb1 = NULL; char pvpbuf[PSBUFSIZE]; if (tTd(21, 2)) *************** *** 1079,1084 **** --- 1080,1093 ---- /* save the remainder of the input */ for (xpvp = pvp; *xpvp != NULL; xpvp++) trsize += sizeof *xpvp; + if (trsize > pvpb1_size) + { + if (pvpb1 != NULL) + free(pvpb1); + pvpb1 = (char **)xalloc(trsize); + pvpb1_size = trsize; + } + bcopy((char *) pvp, (char *) pvpb1, trsize); /* scan the new replacement */ *************** *** 1464,1470 **** snprintf(mbuf, sizeof mbuf, "%.80s map: lookup (%s): deferred", map->s_name, ! shortenstring(key, 203)); e->e_message = newstr(mbuf); } } --- 1473,1479 ---- snprintf(mbuf, sizeof mbuf, "%.80s map: lookup (%s): deferred", map->s_name, ! shortenstring(key, MAXSHORTSTR)); e->e_message = newstr(mbuf); } } *************** *** 2296,2301 **** --- 2305,2311 ---- ** else -- The dequoted buffer. */ + /* ARGSUSED2 */ char * dequote_map(map, name, av, statp) MAP *map; *************** *** 2454,2460 **** printf("rscheck: cannot prescan input\n"); /* syserr("rscheck: cannot prescan input: \"%s\"", ! shortenstring(buf, 203)); rstat = EX_DATAERR; */ goto finis; --- 2464,2470 ---- printf("rscheck: cannot prescan input\n"); /* syserr("rscheck: cannot prescan input: \"%s\"", ! shortenstring(buf, MAXSHORTSTR)); rstat = EX_DATAERR; */ goto finis; diff -cr sendmail-8.9.0/src/queue.c sendmail-8.9.1/src/queue.c *** sendmail-8.9.0/src/queue.c Tue May 19 16:36:08 1998 --- sendmail-8.9.1/src/queue.c Mon Jun 15 10:32:26 1998 *************** *** 14,22 **** #ifndef lint #if QUEUE ! static char sccsid[] = "@(#)queue.c 8.200 (Berkeley) 5/19/98 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.200 (Berkeley) 5/19/98 (without queueing)"; #endif #endif /* not lint */ --- 14,22 ---- #ifndef lint #if QUEUE ! static char sccsid[] = "@(#)queue.c 8.202 (Berkeley) 6/15/98 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.202 (Berkeley) 6/15/98 (without queueing)"; #endif #endif /* not lint */ *************** *** 987,992 **** --- 987,993 ---- while (i != 0 && fgets(lbuf, sizeof lbuf, cf) != NULL) { int c; + time_t age; extern bool strcontainedin __P((char *, char *)); p = strchr(lbuf, '\n'); *************** *** 1060,1066 **** break; case 'K': ! if ((curtime() - (time_t) atol(&lbuf[1])) < MinQueueAge) w->w_tooyoung = TRUE; break; --- 1061,1069 ---- break; case 'K': ! age = curtime() - (time_t) atol(&lbuf[1]); ! if (age >= 0 && MinQueueAge > 0 && ! age < MinQueueAge) w->w_tooyoung = TRUE; break; *************** *** 1770,1775 **** --- 1773,1779 ---- /* if this has been tried recently, let it be */ if (e->e_ntries > 0 && + MinQueueAge > 0 && e->e_dtime <= curtime() && curtime() < e->e_dtime + MinQueueAge) { char *howlong = pintvl(curtime() - e->e_dtime, TRUE); *************** *** 1847,1853 **** default: syserr("readqf: %s: line %d: bad line \"%s\"", ! qf, LineNumber, shortenstring(bp, 203)); fclose(qfp); loseqfile(e, "unrecognized line"); return FALSE; --- 1851,1857 ---- default: syserr("readqf: %s: line %d: bad line \"%s\"", ! qf, LineNumber, shortenstring(bp, MAXSHORTSTR)); fclose(qfp); loseqfile(e, "unrecognized line"); return FALSE; diff -cr sendmail-8.9.0/src/readcf.c sendmail-8.9.1/src/readcf.c *** sendmail-8.9.0/src/readcf.c Tue May 19 16:36:08 1998 --- sendmail-8.9.1/src/readcf.c Mon Jun 8 14:57:05 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)readcf.c 8.229 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)readcf.c 8.230 (Berkeley) 6/5/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 1515,1520 **** --- 1515,1524 ---- #define O_CNCTONLYTO 0xa6 { "ConnectOnlyTo", O_CNCTONLYTO, FALSE }, #endif + #if _FFR_TRUSTED_FILE_OWNER + #define O_TRUSTFILEOWN 0xa7 + { "TrustedFileOwner", O_TRUSTFILEOWN, FALSE }, + #endif { NULL, '\0', FALSE } }; *************** *** 2394,2399 **** --- 2398,2430 ---- case O_CNCTONLYTO: /* XXX should probably use gethostbyname */ ConnectOnlyTo = inet_addr(val); + break; + #endif + + #if _FFR_TRUSTED_FILE_OWNER + case O_TRUSTFILEOWN: + if (isascii(*val) && isdigit(*val)) + TrustedFileUid = atoi(val); + else + { + register struct passwd *pw; + + TrustedFileUid = 0; + pw = sm_getpwnam(val); + if (pw == NULL) + syserr("readcf: option TrustedFileOwner: unknown user %s", val); + else + TrustedFileUid = pw->pw_uid; + } + + #ifdef UID_MAX + if (TrustedFileUid > UID_MAX) + { + syserr("readcf: option TrustedFileOwner: uid value (%ld) > UID_MAX (%ld)", + TrustedFileUid, UID_MAX); + TrustedFileUid = 0; + } + #endif break; #endif diff -cr sendmail-8.9.0/src/recipient.c sendmail-8.9.1/src/recipient.c *** sendmail-8.9.0/src/recipient.c Tue May 19 16:36:03 1998 --- sendmail-8.9.1/src/recipient.c Wed Jun 24 14:32:29 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)recipient.c 8.151 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)recipient.c 8.154 (Berkeley) 6/24/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 365,376 **** if (LogLevel > 2) sm_syslog(LOG_ERR, e->e_id, "include %s: transient error: %s", ! shortenstring(a->q_user, 203), errstring(ret)); a->q_flags |= QQUEUEUP; a->q_flags &= ~QDONTSEND; usrerr("451 Cannot open %s: %s", ! shortenstring(a->q_user, 203), errstring(ret)); } else if (ret != 0) --- 365,376 ---- if (LogLevel > 2) sm_syslog(LOG_ERR, e->e_id, "include %s: transient error: %s", ! shortenstring(a->q_user, MAXSHORTSTR), errstring(ret)); a->q_flags |= QQUEUEUP; a->q_flags &= ~QDONTSEND; usrerr("451 Cannot open %s: %s", ! shortenstring(a->q_user, MAXSHORTSTR), errstring(ret)); } else if (ret != 0) *************** *** 378,384 **** a->q_flags |= QBADADDR; a->q_status = "5.2.4"; usrerr("550 Cannot open %s: %s", ! shortenstring(a->q_user, 203), errstring(ret)); } } --- 378,384 ---- a->q_flags |= QBADADDR; a->q_status = "5.2.4"; usrerr("550 Cannot open %s: %s", ! shortenstring(a->q_user, MAXSHORTSTR), errstring(ret)); } } *************** *** 1045,1051 **** } else sfflags |= SFF_SAFEDIRPATH; ! if (!bitset((forwarding ? DBS_FORWARDFILEINUNSAFEDIRPATHSAFE : DBS_INCLUDEFILEINUNSAFEDIRPATHSAFE), DontBlameSendmail)) --- 1045,1052 ---- } else sfflags |= SFF_SAFEDIRPATH; ! if (ret > E_PSEUDOBASE && ! !bitset((forwarding ? DBS_FORWARDFILEINUNSAFEDIRPATHSAFE : DBS_INCLUDEFILEINUNSAFEDIRPATHSAFE), DontBlameSendmail)) *************** *** 1053,1059 **** if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: unsafe directory path, marked unsafe", ! shortenstring(fname, 203)); ctladdr->q_flags |= QUNSAFEADDR; } } --- 1054,1060 ---- if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: unsafe directory path, marked unsafe", ! shortenstring(fname, MAXSHORTSTR)); ctladdr->q_flags |= QUNSAFEADDR; } } *************** *** 1082,1088 **** if (tTd(27, 4)) printf("include: open: %s\n", errstring(rval)); } ! else if (filechanged(fname, fileno(fp), &st, sfflags)) { rval = E_SM_FILECHANGE; if (tTd(27, 4)) --- 1083,1089 ---- if (tTd(27, 4)) printf("include: open: %s\n", errstring(rval)); } ! else if (filechanged(fname, fileno(fp), &st)) { rval = E_SM_FILECHANGE; if (tTd(27, 4)) *************** *** 1173,1179 **** if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: user %s has bad shell %s, marked %s", ! shortenstring(fname, 203), pw->pw_name, sh, safechown ? "bogus" : "unsafe"); if (safechown) --- 1174,1180 ---- if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: user %s has bad shell %s, marked %s", ! shortenstring(fname, MAXSHORTSTR), pw->pw_name, sh, safechown ? "bogus" : "unsafe"); if (safechown) *************** *** 1212,1223 **** { if (tTd(27, 6)) printf("include: %s is %s writable, marked unsafe\n", ! shortenstring(fname, 203), bitset(S_IWOTH, st.st_mode) ? "world" : "group"); if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: %s writable %s file, marked unsafe", ! shortenstring(fname, 203), bitset(S_IWOTH, st.st_mode) ? "world" : "group", forwarding ? "forward" : ":include:"); ctladdr->q_flags |= QUNSAFEADDR; --- 1213,1224 ---- { if (tTd(27, 6)) printf("include: %s is %s writable, marked unsafe\n", ! shortenstring(fname, MAXSHORTSTR), bitset(S_IWOTH, st.st_mode) ? "world" : "group"); if (LogLevel >= 12) sm_syslog(LOG_INFO, e->e_id, "%s: %s writable %s file, marked unsafe", ! shortenstring(fname, MAXSHORTSTR), bitset(S_IWOTH, st.st_mode) ? "world" : "group", forwarding ? "forward" : ":include:"); ctladdr->q_flags |= QUNSAFEADDR; *************** *** 1259,1265 **** if (forwarding && LogLevel > 9) sm_syslog(LOG_INFO, e->e_id, "forward %.200s => %s", ! oldto, shortenstring(buf, 203)); nincludes += sendtolist(buf, ctladdr, sendq, aliaslevel + 1, e); } --- 1260,1266 ---- if (forwarding && LogLevel > 9) sm_syslog(LOG_INFO, e->e_id, "forward %.200s => %s", ! oldto, shortenstring(buf, MAXSHORTSTR)); nincludes += sendtolist(buf, ctladdr, sendq, aliaslevel + 1, e); } diff -cr sendmail-8.9.0/src/safefile.c sendmail-8.9.1/src/safefile.c *** sendmail-8.9.0/src/safefile.c Tue May 19 16:36:11 1998 --- sendmail-8.9.1/src/safefile.c Fri Jun 5 14:51:02 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)safefile.c 8.38 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)safefile.c 8.40 (Berkeley) 6/5/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 101,107 **** #ifdef SUID_ROOT_FILES_OK if (bitset(S_ISUID, st->st_mode)) #else ! if (bitset(S_ISUID, st->st_mode) && st->st_uid != 0) #endif { uid = st->st_uid; --- 101,108 ---- #ifdef SUID_ROOT_FILES_OK if (bitset(S_ISUID, st->st_mode)) #else ! if (bitset(S_ISUID, st->st_mode) && st->st_uid != 0 && ! st->st_uid != TrustedFileUid) #endif { uid = st->st_uid; *************** *** 203,209 **** { int md = S_IWRITE|S_IEXEC; ! if (stbuf.st_uid != uid) { md >>= 3; if (stbuf.st_gid == gid) --- 204,214 ---- { int md = S_IWRITE|S_IEXEC; ! if (stbuf.st_uid == uid) ! ; ! else if (uid == 0 && TrustedFileUid != 0 && stbuf.st_uid == TrustedFileUid) ! ; ! else { md >>= 3; if (stbuf.st_gid == gid) *************** *** 292,298 **** ; else if (uid == 0 && !bitset(SFF_ROOTOK, flags)) mode >>= 6; ! else if (st->st_uid != uid) { mode >>= 3; if (st->st_gid == gid) --- 297,307 ---- ; else if (uid == 0 && !bitset(SFF_ROOTOK, flags)) mode >>= 6; ! else if (st->st_uid == uid) ! ; ! else if (uid == 0 && TrustedFileUid != 0 && st->st_uid == TrustedFileUid) ! ; ! else { mode >>= 3; if (st->st_gid == gid) *************** *** 319,324 **** --- 328,334 ---- (int) st->st_uid, (int) st->st_nlink, (u_long) st->st_mode, (u_long) mode); if ((st->st_uid == uid || st->st_uid == 0 || + st->st_uid == TrustedFileUid || !bitset(SFF_MUSTOWN, flags)) && (st->st_mode & mode) == mode) { *************** *** 527,533 **** fd = dfopen(fn, omode, cmode, sff); if (fd < 0) return fd; ! if (filechanged(fn, fd, &stb, sff)) { syserr("554 cannot open: file %s changed after open", fn); close(fd); --- 537,543 ---- fd = dfopen(fn, omode, cmode, sff); if (fd < 0) return fd; ! if (filechanged(fn, fd, &stb)) { syserr("554 cannot open: file %s changed after open", fn); close(fd); *************** *** 616,622 **** ** fn -- pathname of file to check. ** fd -- file descriptor to check. ** stb -- stat structure from before open. - ** sff -- safe file flags. ** ** Returns: ** TRUE -- if a problem was detected. --- 626,631 ---- *************** *** 624,634 **** */ bool ! filechanged(fn, fd, stb, sff) char *fn; int fd; struct stat *stb; - int sff; { struct stat sta; --- 633,642 ---- */ bool ! filechanged(fn, fd, stb) char *fn; int fd; struct stat *stb; { struct stat sta; diff -cr sendmail-8.9.0/src/savemail.c sendmail-8.9.1/src/savemail.c *** sendmail-8.9.0/src/savemail.c Tue May 19 16:36:06 1998 --- sendmail-8.9.1/src/savemail.c Wed Jun 17 10:20:00 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)savemail.c 8.136 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)savemail.c 8.138 (Berkeley) 6/17/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 345,350 **** --- 345,352 ---- define('z', p, e); expand("\201z/dead.letter", buf, sizeof buf, e); flags = SFF_CREAT|SFF_REGONLY|SFF_RUNASREALUID; + if (RealUid == 0) + flags |= SFF_ROOTOK; e->e_to = buf; if (mailfile(buf, FileMailer, NULL, flags, e) == EX_OK) { *************** *** 541,547 **** p = "DSN"; sm_syslog(LOG_INFO, e->e_id, "%s: %s: %s", ! ee->e_id, p, shortenstring(msg, 203)); } if (SendMIMEErrors) --- 543,549 ---- p = "DSN"; sm_syslog(LOG_INFO, e->e_id, "%s: %s: %s", ! ee->e_id, p, shortenstring(msg, MAXSHORTSTR)); } if (SendMIMEErrors) *************** *** 786,797 **** printheader = FALSE; } ! snprintf(buf, sizeof buf, "%s", shortenstring(q->q_paddr, 203)); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, 203)); putline(buf, mci); } } --- 788,800 ---- printheader = FALSE; } ! snprintf(buf, sizeof buf, "%s", ! shortenstring(q->q_paddr, MAXSHORTSTR)); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, MAXSHORTSTR)); putline(buf, mci); } } *************** *** 813,824 **** printheader = FALSE; } ! snprintf(buf, sizeof buf, "%s", shortenstring(q->q_paddr, 203)); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, 203)); putline(buf, mci); } } --- 816,828 ---- printheader = FALSE; } ! snprintf(buf, sizeof buf, "%s", ! shortenstring(q->q_paddr, MAXSHORTSTR)); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, MAXSHORTSTR)); putline(buf, mci); } } *************** *** 856,867 **** } snprintf(buf, sizeof buf, "%s (%s)", ! shortenstring(q->q_paddr, 203), p); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, 203)); putline(buf, mci); } } --- 860,871 ---- } snprintf(buf, sizeof buf, "%s (%s)", ! shortenstring(q->q_paddr, MAXSHORTSTR), p); putline(buf, mci); if (q->q_alias != NULL) { snprintf(buf, sizeof buf, " (expanded from: %s)", ! shortenstring(q->q_alias->q_paddr, MAXSHORTSTR)); putline(buf, mci); } } diff -cr sendmail-8.9.0/src/sendmail.h sendmail-8.9.1/src/sendmail.h *** sendmail-8.9.0/src/sendmail.h Tue May 19 16:36:06 1998 --- sendmail-8.9.1/src/sendmail.h Wed Jun 24 10:54:16 1998 *************** *** 9,15 **** * the sendmail distribution. * * ! * @(#)sendmail.h 8.278 (Berkeley) 5/19/98 */ /* --- 9,15 ---- * the sendmail distribution. * * ! * @(#)sendmail.h 8.280 (Berkeley) 6/5/98 */ /* *************** *** 19,25 **** # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.278 5/19/98"; # endif # else /* _DEFINE */ # define EXTERN extern --- 19,25 ---- # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.280 6/5/98"; # endif # else /* _DEFINE */ # define EXTERN extern *************** *** 998,1004 **** extern int safeopen __P((char *, int, int, int)); extern FILE *safefopen __P((char *, int, int, int)); extern int dfopen __P((char *, int, int, int)); ! extern bool filechanged __P((char *, int, struct stat *, int)); /* --- 998,1004 ---- extern int safeopen __P((char *, int, int, int)); extern FILE *safefopen __P((char *, int, int, int)); extern int dfopen __P((char *, int, int, int)); ! extern bool filechanged __P((char *, int, struct stat *)); /* *************** *** 1183,1188 **** --- 1183,1189 ---- EXTERN uid_t DefUid; /* default uid to run as */ EXTERN gid_t DefGid; /* default gid to run as */ EXTERN char *DefUser; /* default user to run as (from DefUid) */ + EXTERN uid_t TrustedFileUid; /* uid of trusted owner of files and dirs */ EXTERN MODE_T OldUmask; /* umask when sendmail starts up */ EXTERN int Verbose; /* set if blow-by-blow desired */ EXTERN int Errors; /* set if errors (local to single pass) */ diff -cr sendmail-8.9.0/src/snprintf.c sendmail-8.9.1/src/snprintf.c *** sendmail-8.9.0/src/snprintf.c Tue May 19 16:36:11 1998 --- sendmail-8.9.1/src/snprintf.c Thu Jun 4 14:32:02 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)snprintf.c 8.10 (Berkeley) 5/19/98"; #endif /* not lint */ #include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)snprintf.c 8.11 (Berkeley) 6/4/98"; #endif /* not lint */ #include "sendmail.h" *************** *** 83,89 **** DoprEnd[0] = 0; if (SnprfOverflow && tTd(57, 2)) printf("\nvsnprintf overflow, len = %ld, str = %s", ! (long) count, shortenstring(str, 203)); return strlen(str); } --- 83,89 ---- DoprEnd[0] = 0; if (SnprfOverflow && tTd(57, 2)) printf("\nvsnprintf overflow, len = %ld, str = %s", ! (long) count, shortenstring(str, MAXSHORTSTR)); return strlen(str); } *************** *** 394,403 **** ** Returns: ** Either s or a short version of s. */ - - #ifndef MAXSHORTSTR - # define MAXSHORTSTR 203 - #endif char * shortenstring(s, m) --- 394,399 ---- diff -cr sendmail-8.9.0/src/srvrsmtp.c sendmail-8.9.1/src/srvrsmtp.c *** sendmail-8.9.0/src/srvrsmtp.c Tue May 19 16:36:07 1998 --- sendmail-8.9.1/src/srvrsmtp.c Mon Jun 15 10:31:47 1998 *************** *** 14,22 **** #ifndef lint #if SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.177 (Berkeley) 5/19/98 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.177 (Berkeley) 5/19/98 (without SMTP)"; #endif #endif /* not lint */ --- 14,22 ---- #ifndef lint #if SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.181 (Berkeley) 6/15/98 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.181 (Berkeley) 6/15/98 (without SMTP)"; #endif #endif /* not lint */ *************** *** 127,132 **** --- 127,133 ---- char *id; volatile int nrcpts = 0; /* number of RCPT commands */ bool doublequeue; + bool discard; volatile int badcommands = 0; /* count of bad commands */ volatile int nverifies = 0; /* count of VRFY/EXPN commands */ volatile int n_etrn = 0; /* count of ETRN commands */ *************** *** 159,164 **** --- 160,168 ---- if (CurSmtpClient == NULL) CurSmtpClient = CurHostName; + /* check_relay may have set discard bit, save for later */ + discard = bitset(EF_DISCARD, e->e_flags); + setproctitle("server %s startup", CurSmtpClient); #if DAEMON if (LogLevel > 11) *************** *** 429,435 **** message("250-DSN"); #endif message("250-ONEX"); ! message("250-ETRN"); message("250-XUSR"); message("250 HELP"); break; --- 433,440 ---- message("250-DSN"); #endif message("250-ONEX"); ! if (!bitset(PRIV_NOETRN, PrivacyFlags)) ! message("250-ETRN"); message("250-XUSR"); message("250 HELP"); break; *************** *** 716,721 **** --- 721,730 ---- break; } + /* put back discard bit */ + if (discard) + e->e_flags |= EF_DISCARD; + /* check to see if we need to re-expand aliases */ /* also reset QBADADDR on already-diagnosted addrs */ doublequeue = FALSE; *************** *** 853,859 **** sm_syslog(LOG_INFO, e->e_id, "%.100s: %s [rejected]", CurSmtpClient, ! shortenstring(inp, 203)); break; } else if (!gothello && --- 862,868 ---- sm_syslog(LOG_INFO, e->e_id, "%.100s: %s [rejected]", CurSmtpClient, ! shortenstring(inp, MAXSHORTSTR)); break; } else if (!gothello && *************** *** 871,877 **** sm_syslog(LOG_INFO, e->e_id, "%.100s: %s", CurSmtpClient, ! shortenstring(inp, 203)); if (setjmp(TopFrame) > 0) goto undo_subproc; QuickAbort = TRUE; --- 880,886 ---- sm_syslog(LOG_INFO, e->e_id, "%.100s: %s", CurSmtpClient, ! shortenstring(inp, MAXSHORTSTR)); if (setjmp(TopFrame) > 0) goto undo_subproc; QuickAbort = TRUE; *************** *** 918,924 **** sm_syslog(LOG_INFO, e->e_id, "%.100s: %s [rejected]", CurSmtpClient, ! shortenstring(inp, 203)); break; } --- 927,933 ---- sm_syslog(LOG_INFO, e->e_id, "%.100s: %s [rejected]", CurSmtpClient, ! shortenstring(inp, MAXSHORTSTR)); break; } *************** *** 935,941 **** sm_syslog(LOG_INFO, e->e_id, "%.100s: ETRN %s", CurSmtpClient, ! shortenstring(p, 203)); id = p; if (*id == '@') --- 944,950 ---- sm_syslog(LOG_INFO, e->e_id, "%.100s: ETRN %s", CurSmtpClient, ! shortenstring(p, MAXSHORTSTR)); id = p; if (*id == '@') *************** *** 1044,1050 **** } usrerr("500 Command unrecognized: \"%s\"", ! shortenstring(inp, 203)); break; default: --- 1053,1059 ---- } usrerr("500 Command unrecognized: \"%s\"", ! shortenstring(inp, MAXSHORTSTR)); break; default: *************** *** 1126,1132 **** { syntax: usrerr("501 Syntax error in parameters scanning \"%s\"", ! shortenstring(firstp, 203)); return (NULL); } *p++ = '\0'; --- 1135,1141 ---- { syntax: usrerr("501 Syntax error in parameters scanning \"%s\"", ! shortenstring(firstp, MAXSHORTSTR)); return (NULL); } *p++ = '\0'; diff -cr sendmail-8.9.0/src/sysexits.c sendmail-8.9.1/src/sysexits.c *** sendmail-8.9.0/src/sysexits.c Tue May 19 16:36:02 1998 --- sendmail-8.9.1/src/sysexits.c Sun May 24 14:03:36 1998 *************** *** 11,20 **** */ #ifndef lint ! static char sccsid[] = "@(#)sysexits.c 8.12 (Berkeley) 5/19/98"; #endif /* not lint */ ! #include /* ** SYSEXITS.C -- error messages corresponding to sysexits.h --- 11,20 ---- */ #ifndef lint ! static char sccsid[] = "@(#)sysexits.c 8.13 (Berkeley) 5/24/98"; #endif /* not lint */ ! #include "sendmail.h" /* ** SYSEXITS.C -- error messages corresponding to sysexits.h diff -cr sendmail-8.9.0/src/udb.c sendmail-8.9.1/src/udb.c *** sendmail-8.9.0/src/udb.c Tue May 19 16:36:09 1998 --- sendmail-8.9.1/src/udb.c Wed Jun 24 11:26:47 1998 *************** *** 14,22 **** #ifndef lint #if USERDB ! static char sccsid [] = "@(#)udb.c 8.63 (Berkeley) 5/19/98 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.63 (Berkeley) 5/19/98 (without USERDB)"; #endif #endif --- 14,22 ---- #ifndef lint #if USERDB ! static char sccsid [] = "@(#)udb.c 8.66 (Berkeley) 6/18/98 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.66 (Berkeley) 6/18/98 (without USERDB)"; #endif #endif *************** *** 323,329 **** sm_syslog(LOG_INFO, e->e_id, "expand %.100s => %s", e->e_to, ! shortenstring(user, 203)); naddrs = sendtolist(user, a, sendq, aliaslevel + 1, e); if (naddrs > 0 && !bitset(QSELFREF, a->q_flags)) { --- 323,329 ---- sm_syslog(LOG_INFO, e->e_id, "expand %.100s => %s", e->e_to, ! shortenstring(user, MAXSHORTSTR)); naddrs = sendtolist(user, a, sendq, aliaslevel + 1, e); if (naddrs > 0 && !bitset(QSELFREF, a->q_flags)) { *************** *** 461,467 **** sm_syslog(LOG_INFO, e->e_id, "hesiod %.100s => %s", e->e_to, ! shortenstring(user, 203)); naddrs = sendtolist(user, a, sendq, aliaslevel + 1, e); if (naddrs > 0 && !bitset(QSELFREF, a->q_flags)) --- 461,467 ---- sm_syslog(LOG_INFO, e->e_id, "hesiod %.100s => %s", e->e_to, ! shortenstring(user, MAXSHORTSTR)); naddrs = sendtolist(user, a, sendq, aliaslevel + 1, e); if (naddrs > 0 && !bitset(QSELFREF, a->q_flags)) *************** *** 641,647 **** if (tTd(28, 1)) printf("udbmatch ==> %s\n", p); return p; - break; #endif #ifdef HESIOD --- 641,646 ---- *************** *** 742,748 **** if (tTd(28, 1)) printf("udbmatch ==> %s\n", p); return p; - break; #endif #ifdef HESIOD --- 741,746 ---- *************** *** 809,814 **** --- 807,813 ---- ** The rewritten name otherwise. */ + /* ARGSUSED3 */ char * udb_map_lookup(map, name, av, statp) MAP *map; *************** *** 868,873 **** --- 867,873 ---- _udbx_init(e) ENVELOPE *e; { + int ents = 0; register char *p; register struct udbent *up; *************** *** 884,890 **** while (p != NULL) { char *spec; - int nopts; int l; # if 0 auto int rcode; --- 884,889 ---- *************** *** 905,912 **** if (p != NULL) *p++ = '\0'; /* extract options */ ! nopts = _udb_parsespec(spec, opts, MAXUDBOPTS); /* ** Decode database specification. --- 904,917 ---- if (p != NULL) *p++ = '\0'; + if (ents >= MAXUDBENT) + { + syserr("Maximum number of UDB entries exceeded"); + break; + } + /* extract options */ ! (void) _udb_parsespec(spec, opts, MAXUDBOPTS); /* ** Decode database specification. *************** *** 973,978 **** --- 978,984 ---- INADDRSZ); up->udb_addr.sin_port = UdbPort; up->udb_timeout = UdbTimeout; + ents++; up++; } *************** *** 988,993 **** --- 994,1000 ---- case '@': /* forward to remote host */ up->udb_type = UDB_FORWARD; up->udb_fwdhost = spec + 1; + ents++; up++; break; *************** *** 997,1002 **** --- 1004,1010 ---- if (strcasecmp(spec, "hesiod") != 0) goto badspec; up->udb_type = UDB_HESIOD; + ents++; up++; break; #endif /* HESIOD */ *************** *** 1059,1064 **** --- 1067,1073 ---- break; } up->udb_type = UDB_DBFETCH; + ents++; up++; break; #endif diff -cr sendmail-8.9.0/src/usersmtp.c sendmail-8.9.1/src/usersmtp.c *** sendmail-8.9.0/src/usersmtp.c Tue May 19 16:36:02 1998 --- sendmail-8.9.1/src/usersmtp.c Thu Jul 2 10:49:58 1998 *************** *** 14,22 **** #ifndef lint #if SMTP ! static char sccsid[] = "@(#)usersmtp.c 8.102 (Berkeley) 5/19/98 (with SMTP)"; #else ! static char sccsid[] = "@(#)usersmtp.c 8.102 (Berkeley) 5/19/98 (without SMTP)"; #endif #endif /* not lint */ --- 14,22 ---- #ifndef lint #if SMTP ! static char sccsid[] = "@(#)usersmtp.c 8.104 (Berkeley) 6/30/98 (with SMTP)"; #else ! static char sccsid[] = "@(#)usersmtp.c 8.104 (Berkeley) 6/30/98 (without SMTP)"; #endif #endif /* not lint */ *************** *** 480,486 **** else if (r == 552) { /* exceeded storage allocation */ ! mci_setstat(mci, EX_NOTSTICKY, "5.2.2", SmtpReplyBuffer); if (bitset(MCIF_SIZE, mci->mci_flags)) e->e_flags |= EF_NO_BODY_RETN; return EX_UNAVAILABLE; --- 480,486 ---- else if (r == 552) { /* exceeded storage allocation */ ! mci_setstat(mci, EX_NOTSTICKY, "5.3.4", SmtpReplyBuffer); if (bitset(MCIF_SIZE, mci->mci_flags)) e->e_flags |= EF_NO_BODY_RETN; return EX_UNAVAILABLE; *************** *** 1026,1032 **** int plen; snprintf(p, wbufleft, "%s... ", ! shortenstring(e->e_to, 203)); plen = strlen(p); p += plen; wbufleft -= plen; --- 1026,1032 ---- int plen; snprintf(p, wbufleft, "%s... ", ! shortenstring(e->e_to, MAXSHORTSTR)); plen = strlen(p); p += plen; wbufleft -= plen; diff -cr sendmail-8.9.0/src/util.c sendmail-8.9.1/src/util.c *** sendmail-8.9.0/src/util.c Tue May 19 16:36:07 1998 --- sendmail-8.9.1/src/util.c Wed Jul 1 19:22:50 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.156 (Berkeley) 5/19/98"; #endif /* not lint */ # include "sendmail.h" --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.159 (Berkeley) 7/1/98"; #endif /* not lint */ # include "sendmail.h" *************** *** 386,391 **** --- 386,393 ---- if (c == MACRODEXPAND) putchar('&'); shiftout = TRUE; + if (*s == '\0') + continue; if (strchr("=~&?", *s) != NULL) putchar(*s++); if (bitset(0200, *s)) *************** *** 922,927 **** --- 924,930 ---- return (buf); } + /* ARGSUSED */ static void readtimeout(timeout) time_t timeout; *************** *** 1778,1784 **** sm_syslog(LOG_NOTICE, CurEnv->e_id, "POSSIBLE ATTACK from %.100s: newline in string \"%s\"", RealHostName == NULL ? "[UNKNOWN]" : RealHostName, ! shortenstring(bp, 203)); } return bp; --- 1781,1787 ---- sm_syslog(LOG_NOTICE, CurEnv->e_id, "POSSIBLE ATTACK from %.100s: newline in string \"%s\"", RealHostName == NULL ? "[UNKNOWN]" : RealHostName, ! shortenstring(bp, MAXSHORTSTR)); } return bp; diff -cr sendmail-8.9.0/src/version.c sendmail-8.9.1/src/version.c *** sendmail-8.9.0/src/version.c Tue May 19 16:36:05 1998 --- sendmail-8.9.1/src/version.c Thu Jul 2 11:04:58 1998 *************** *** 11,17 **** */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.9 (Berkeley) 5/19/98"; #endif /* not lint */ ! char Version[] = "8.9.0"; --- 11,17 ---- */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.9.1.1 (Berkeley) 7/2/98"; #endif /* not lint */ ! char Version[] = "8.9.1";