diff options
author | Martin Schulze <joey@infodrom.org> | 2004-09-13 09:07:18 +0200 |
---|---|---|
committer | Andreas Beckmann <debian@abeckmann.de> | 2012-10-01 19:58:43 +0200 |
commit | ae03fe5d926a63cab418207f760d62a947957123 (patch) | |
tree | aa48cfe56ac7c47fb9b0abce4d4689033d3098d6 /debian/patches | |
parent | dd994db23cb7f88732be927fad3a7039bd6301db (diff) | |
download | sendmail-debian/8.12.3-7.1.tar.gz |
Imported Debian patch 8.12.3-7.1debian/8.12.3-7.1
Diffstat (limited to 'debian/patches')
40 files changed, 848 insertions, 1384 deletions
diff --git a/debian/patches/8.12/8.12.3/CAN-2003-0681.patch b/debian/patches/8.12/8.12.3/CAN-2003-0681.patch new file mode 100644 index 0000000..de31a60 --- /dev/null +++ b/debian/patches/8.12/8.12.3/CAN-2003-0681.patch @@ -0,0 +1,87 @@ +Index: parseaddr.c +=================================================================== +RCS file: /cvs/sendmail/parseaddr.c,v +retrieving revision 8.359.2.6 +diff -u -r8.359.2.6 parseaddr.c +--- parseaddr.c 27 Mar 2003 02:39:53 -0000 8.359.2.6 ++++ sendmail-8.12.3/sendmail/parseaddr.c 30 Mar 2003 16:41:50 -0000 +@@ -1000,6 +1008,8 @@ + } + if (pvp == NULL) + return EX_USAGE; ++ if (maxatom <= 0) ++ return EX_USAGE; + + /* + ** Run through the list of rewrite rules, applying +@@ -1866,6 +1880,7 @@ + register ENVELOPE *e; + { + bool tempfail = false; ++ int maxatom; + struct mailer **mp; + register struct mailer *m; + register char *p; +@@ -1880,6 +1895,7 @@ + printav(tv); + } + ++ maxatom = MAXATOM; + if (a == NULL) + a = (ADDRESS *) sm_rpool_malloc_x(e->e_rpool, sizeof *a); + memset((char *) a, '\0', sizeof *a); +@@ -1919,14 +1935,22 @@ + return a; + } + mname = *++tv; ++ --maxatom; + + /* extract host and user portions */ + if (*++tv != NULL && (**tv & 0377) == CANONHOST) ++ { + hostp = ++tv; ++ --maxatom; ++ } + else + hostp = NULL; ++ --maxatom; + while (*tv != NULL && (**tv & 0377) != CANONUSER) ++ { + tv++; ++ --maxatom; ++ } + if (*tv == NULL) + { + syserr("554 5.3.5 buildaddr: no user"); +@@ -1937,6 +1961,7 @@ + else if (hostp != NULL) + cataddr(hostp, tv - 1, hbuf, sizeof hbuf, '\0'); + cataddr(++tv, NULL, ubuf, sizeof ubuf, ' '); ++ --maxatom; + + /* save away the host name */ + if (sm_strcasecmp(mname, "error") == 0) +@@ -2041,6 +2066,7 @@ + { + p++; + tv++; ++ --maxatom; + a->q_flags |= QNOTREMOTE; + } + +@@ -2071,11 +2097,11 @@ + !bitset(RF_SENDERADDR|RF_HEADERADDR, flags)) + { + /* sender addresses done later */ +- (void) REWRITE(tv, 2, e); ++ (void) rewrite(tv, 2, 0, e, maxatom); + if (m->m_re_rwset > 0) +- (void) REWRITE(tv, m->m_re_rwset, e); ++ (void) rewrite(tv, m->m_re_rwset, 0, e, maxatom); + } +- (void) REWRITE(tv, 4, e); ++ (void) rewrite(tv, 4, 0, e, maxatom); + + /* save the result for the command line/RCPT argument */ + cataddr(tv, NULL, ubuf, sizeof ubuf, '\0'); + diff --git a/debian/patches/8.12/8.12.3/CAN-2003-0694.patch b/debian/patches/8.12/8.12.3/CAN-2003-0694.patch new file mode 100644 index 0000000..bdba504 --- /dev/null +++ b/debian/patches/8.12/8.12.3/CAN-2003-0694.patch @@ -0,0 +1,15 @@ +diff -ru build-tree.orig/sendmail-8.12.3/sendmail/parseaddr.c build-tree/sendmail-8.12.3/sendmail/parseaddr.c +--- build-tree.orig/sendmail-8.12.3/sendmail/parseaddr.c 2003-09-17 10:43:53.000000000 -0400 ++++ sendmail-8.12.3/sendmail/parseaddr.c 2003-09-17 10:45:06.000000000 -0400 +@@ -700,7 +700,11 @@ + addr[MAXNAME] = '\0'; + returnnull: + if (delimptr != NULL) ++ { ++ if (p > addr) ++ p--; + *delimptr = p; ++ } + CurEnv->e_to = saveto; + return NULL; + } diff --git a/debian/patches/8.12/8.12.3/bf.c.8.51 b/debian/patches/8.12/8.12.3/bf.c.8.51 new file mode 100644 index 0000000..fec8d59 --- /dev/null +++ b/debian/patches/8.12/8.12.3/bf.c.8.51 @@ -0,0 +1,30 @@ +Index: sendmail/bf.c +diff -u sendmail/bf.c:8.51 sendmail/bf.c:8.52 +--- sendmail/bf.c:8.51 Mon Mar 4 13:51:25 2002 ++++ ./sendmail-8.12.3/sendmail/bf.c Thu Apr 11 14:00:15 2002 +@@ -202,12 +202,24 @@ + ** any value of errno specified by sm_io_setinfo() + */ + ++#ifdef __STDC__ ++/* ++** XXX This is a temporary hack since MODE_T on HP-UX 10.x is short. ++** If we use K&R here, the compiler will complain about ++** Inconsistent parameter list declaration ++** due to the change from short to int. ++*/ ++ + SM_FILE_T * ++bfopen(char *filename, MODE_T fmode, size_t bsize, long flags) ++#else /* __STDC__ */ ++SM_FILE_T * + bfopen(filename, fmode, bsize, flags) + char *filename; + MODE_T fmode; + size_t bsize; + long flags; ++#endif /* __STDC__ */ + { + MODE_T omask; + SM_FILE_T SM_IO_SET_TYPE(vector, BF_FILE_TYPE, sm_bfopen, sm_bfclose, + diff --git a/debian/patches/8.12/8.12.3/domain.c.8.181 b/debian/patches/8.12/8.12.3/domain.c.8.181 new file mode 100644 index 0000000..da6a59f --- /dev/null +++ b/debian/patches/8.12/8.12.3/domain.c.8.181 @@ -0,0 +1,16 @@ +Index: domain.c +=================================================================== +RCS file: /cvs/sendmail/domain.c,v +retrieving revision 8.181 +diff -u -r8.181 domain.c +--- domain.c 2002/05/24 23:48:42 8.181 ++++ ./sendmail-8.12.3/sendmail/domain.c 2002/06/27 15:45:27 +@@ -737,7 +737,7 @@ + #endif /* _FFR_BESTMX_BETTER_TRUNCATION */ + + _res.options &= ~(RES_DNSRCH|RES_DEFNAMES); +- nmx = getmxrr(name, mxhosts, NULL, false, statp, true, NULL); ++ nmx = getmxrr(name, mxhosts, NULL, false, statp, false, NULL); + _res.options = saveopts; + if (nmx <= 0) + return NULL; diff --git a/debian/patches/8.12/8.12.3/dpatch.001 b/debian/patches/8.12/8.12.3/dpatch.001 new file mode 100644 index 0000000..972c1c2 --- /dev/null +++ b/debian/patches/8.12/8.12.3/dpatch.001 @@ -0,0 +1,50 @@ +# Remove -Y from procmail arguements +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c 'cf/feature/local_procmail.m4' 'debian/patches/local_procmail.m4' +Index: ./cf/feature/local_procmail.m4 +Prereq: 8.21 +*** sendmail-8.12.3/cf/feature/local_procmail.m4 Sat Nov 20 15:26:21 1999 +--- ./debian/patches/local_procmail.m4 Sat Nov 20 15:39:46 1999 +*************** +*** 27,32 **** + `/usr/local/bin/procmail'), + _ARG_)) + define(`LOCAL_MAILER_ARGS', +! ifelse(len(X`'_ARG2_), `1', `procmail -Y -a $h -d $u', _ARG2_)) + define(`LOCAL_MAILER_FLAGS', + ifelse(len(X`'_ARG3_), `1', `SPfhn9', _ARG3_)) +--- 27,32 ---- + `/usr/local/bin/procmail'), + _ARG_)) + define(`LOCAL_MAILER_ARGS', +! ifelse(len(X`'_ARG2_), `1', `procmail -a $h -d $u', _ARG2_)) + define(`LOCAL_MAILER_FLAGS', + ifelse(len(X`'_ARG3_), `1', `SPfhn9', _ARG3_)) +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Sat Nov 20 15:39:47 1999 +# Generated by : makepatch 2.00 +# Recurse directories : Yes +# p 'cf/feature/local_procmail.m4' 941 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Sat Nov 20 15:39:47 1999] #### +#### Checksum: 49 1730 1445 #### diff --git a/debian/patches/cf.mailer.cyrus.m4 b/debian/patches/8.12/8.12.3/dpatch.002 index 85f7632..6f569d9 100644 --- a/debian/patches/cf.mailer.cyrus.m4 +++ b/debian/patches/8.12/8.12.3/dpatch.002 @@ -1,17 +1,18 @@ ---- ./cf/mailer/cyrus.m4 Tue May 2 14:40:24 2000 +--- sendmail-8.12.3/cf/mailer/cyrus.m4 Tue May 2 14:40:24 2000 +++ ./debian/patches/cf/mailer/cyrus.m4 Tue May 2 14:41:21 2000 -@@ -35,11 +35,11 @@ +@@ -36,12 +36,12 @@ # - ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@/:|')') + _DEFIFNOT(`CYRUS_MAILER_FLAGS', `Ah5@/:|') -ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)') -ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')') +ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/sbin/cyrdeliver)') +ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `cyrdeliver -e -m $h -- $u')') ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')') - ifdef(`CYRUS_BB_MAILER_FLAGS',, `define(`CYRUS_BB_MAILER_FLAGS', `')') + _DEFIFNOT(`CYRUS_BB_MAILER_FLAGS', `u') -ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')') +ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `cyrdeliver -e -m $u')') + define(`_CYRUS_QGRP', `ifelse(defn(`CYRUS_MAILER_QGRP'),`',`', ` Q=CYRUS_MAILER_QGRP,')')dnl POPDIVERT diff --git a/debian/patches/patch.rmail b/debian/patches/8.12/8.12.3/dpatch.003 index c42593d..511d2b0 100644 --- a/debian/patches/patch.rmail +++ b/debian/patches/8.12/8.12.3/dpatch.003 @@ -1,4 +1,4 @@ -# Allow background delivery of mail, instead of queueing +# Change sendmail call -obq to -obi # # To apply this patch: # STEP 1: Chdir to the source directory. @@ -16,25 +16,25 @@ #### End of Preamble #### #### Patch data follows #### -diff -c '../../rmail/rmail.c' 'rmail.c' -Index: ./../../rmail/rmail.c -Prereq: 8.18 -*** ./../../rmail/rmail.c Tue Dec 29 12:43:05 1998 ---- ./rmail.c Mon Sep 13 10:47:12 1999 +diff -c 'rmail/rmail.c' 'debian/patches/rmail.c' +Index: ./rmail/rmail.c +Prereq: 8.61 +*** sendmail-8.12.3/rmail/rmail.c Sat Sep 16 18:20:25 2000 +--- ./debian/patches/rmail.c Thu Sep 28 17:00:59 2000 *************** -*** 273,279 **** - i = 0; +*** 318,324 **** args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */ + args[i++] = "-G"; /* relay submission */ args[i++] = "-oee"; /* No errors, just status. */ ! args[i++] = "-odq"; /* Queue it, don't try to deliver. */ args[i++] = "-oi"; /* Ignore '.' on a line by itself. */ /* set from system and protocol used */ ---- 273,279 ---- - i = 0; +--- 318,324 ---- args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */ + args[i++] = "-G"; /* relay submission */ args[i++] = "-oee"; /* No errors, just status. */ -! args[i++] = "-odi"; /* deliver in the foreground. */ +! args[i++] = "-odi"; /* deliver in the foreground. */ args[i++] = "-oi"; /* Ignore '.' on a line by itself. */ /* set from system and protocol used */ @@ -42,11 +42,11 @@ Prereq: 8.18 #### ApplyPatch data follows #### # Data version : 1.0 -# Date generated : Mon Sep 13 10:47:49 1999 +# Date generated : Thu Sep 28 17:01:04 2000 # Generated by : makepatch 2.00 # Recurse directories : Yes -# p '../../rmail/rmail.c' 10101 +# p './build-tree/sendmail-8.11.1/rmail/rmail.c' 12072 #### End of ApplyPatch data #### -#### End of Patch kit [created: Mon Sep 13 10:47:49 1999] #### -#### Checksum: 51 1826 6572 #### +#### End of Patch kit [created: Thu Sep 28 17:01:04 2000] #### +#### Checksum: 51 2010 21691 #### diff --git a/debian/patches/8.12/8.12.3/dpatch.004 b/debian/patches/8.12/8.12.3/dpatch.004 new file mode 100644 index 0000000..867a195 --- /dev/null +++ b/debian/patches/8.12/8.12.3/dpatch.004 @@ -0,0 +1,52 @@ +# Make control socket mode 0660 +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c 'sendmail/control.c' 'debian/patches/control.c' +Index: ./sendmail/control.c +Prereq: 8.118 +*** sendmail-8.12.3/sendmail/control.c Sat Nov 20 15:26:23 1999 +--- ./debian/patches/control.c Sat Nov 20 15:39:52 1999 +*************** +*** 92,98 **** + } + } + +! if (chmod(ControlSocketName, S_IRUSR|S_IWUSR) < 0) + { + save_errno = errno; + closecontrolsocket(TRUE); +--- 92,98 ---- + } + } + +! if (chmod(ControlSocketName, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) < 0) + { + save_errno = errno; + closecontrolsocket(TRUE); +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Sat Nov 20 15:39:53 1999 +# Generated by : makepatch 2.00 +# Recurse directories : Yes +# p 'sendmail/control.c' 6165 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Sat Nov 20 15:39:53 1999] #### +#### Checksum: 51 1497 50060 #### diff --git a/debian/patches/8.12/8.12.3/dpatch.005 b/debian/patches/8.12/8.12.3/dpatch.005 new file mode 100644 index 0000000..c4ba0c5 --- /dev/null +++ b/debian/patches/8.12/8.12.3/dpatch.005 @@ -0,0 +1,54 @@ +# /usr/bin/faxmail, !/usr/local/bin/faxmail +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c './cf/mailer/fax.m4' 'fax.m4' +Index: ./cf/mailer/fax.m4 +Prereq: 8.16 +*** sendmail-8.12.3/cf/mailer/fax.m4 Mon Oct 18 02:35:28 1999 +--- ./fax.m4 Wed Jan 3 14:26:13 2001 +*************** +*** 19,26 **** + ifdef(`FAX_MAILER_ARGS',, + `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)') + ifdef(`FAX_MAILER_PATH',, +! `define(`FAX_MAILER_PATH', /usr/local/bin/faxmail)') + ifdef(`FAX_MAILER_MAX',, + `define(`FAX_MAILER_MAX', 100000)') + define(`_FAX_QGRP', `ifelse(defn(`FAX_MAILER_QGRP'),`',`', ` Q=FAX_MAILER_QGRP,')')dnl + POPDIVERT +--- 19,26 ---- + ifdef(`FAX_MAILER_ARGS',, + `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)') + ifdef(`FAX_MAILER_PATH',, +! `define(`FAX_MAILER_PATH', /usr/bin/faxmail)') + ifdef(`FAX_MAILER_MAX',, + `define(`FAX_MAILER_MAX', 100000)') + define(`_FAX_QGRP', `ifelse(defn(`FAX_MAILER_QGRP'),`',`', ` Q=FAX_MAILER_QGRP,')')dnl + POPDIVERT +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Wed Jan 3 14:27:33 2001 +# Generated by : makepatch 2.00 +# Recurse directories : Yes +# p '../../build-tree/sendmail-8.11.2/cf/mailer/fax.m4' 1062 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Wed Jan 3 14:27:33 2001] #### +#### Checksum: 51 1807 4852 #### diff --git a/debian/patches/8.12/8.12.3/dsa-doublebounce.patch b/debian/patches/8.12/8.12.3/dsa-doublebounce.patch new file mode 100644 index 0000000..f920d0a --- /dev/null +++ b/debian/patches/8.12/8.12.3/dsa-doublebounce.patch @@ -0,0 +1,20 @@ +diff -u doublebounce.pl.old doublebounce.pl +--- doublebounce.pl.old Sun Feb 7 05:44:09 1999 ++++ ./sendmail-8.12.3/contrib/doublebounce.pl Mon Apr 14 08:46:02 2003 +@@ -26,6 +26,7 @@ + + + use Socket; ++use Fcntl; + + # look for debug flag + # +@@ -45,7 +46,7 @@ + # I thought about reading it into a buffer here, but some messages + # are 10+Mb so a buffer may not be a good idea + # +-if (! open(MSG, "+> $tmp")) { ++if (! sysopen(MSG, "$tmp", O_RDWR|O_CREAT|O_EXCL, 0600)) { + # can't open temp file -- send message to local postmaster + # open(MAIL, "| /usr/sbin/sendmail -oeq postmaster"); + print MAIL <STDIN>; diff --git a/debian/patches/8.12/8.12.3/dsa-expn.patch b/debian/patches/8.12/8.12.3/dsa-expn.patch new file mode 100644 index 0000000..c24bfaa --- /dev/null +++ b/debian/patches/8.12/8.12.3/dsa-expn.patch @@ -0,0 +1,20 @@ +diff -u expn.old expn +--- expn.old Sat Apr 5 00:07:36 2003 ++++ ./sendmail-8.12.3/contrib/expn.pl Mon Apr 14 08:37:41 2003 +@@ -8,6 +8,7 @@ + + use 5.001; + use IO::Socket; ++use Fcntl; + + # system requirements: + # must have 'nslookup' and 'hostname' programs. +@@ -999,7 +1000,7 @@ + } + + $0 = "$av0 - nslookup of $server"; +- open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n"; ++ sysopen(T,"/tmp/expn$$",O_RDWR|O_CREAT|O_EXCL,0600) || die "open > /tmp/expn$$: $!\n"; + print T "set querytype=MX\n"; + print T "$server\n"; + close(T); diff --git a/debian/patches/8.12/8.12.3/main.c.8.876 b/debian/patches/8.12/8.12.3/main.c.8.876 new file mode 100644 index 0000000..9be7994 --- /dev/null +++ b/debian/patches/8.12/8.12.3/main.c.8.876 @@ -0,0 +1,17 @@ +Index: main.c +=================================================================== +RCS file: /cvs/sendmail/main.c,v +retrieving revision 8.876 +diff -u -r8.876 main.c +--- ./sendmail-8.12.3/sendmail/main.c 2002/02/27 23:49:52 8.876 ++++ main.c 2002/04/10 23:59:28 +@@ -726,6 +726,8 @@ + (void) sm_signal(SIGPIPE, SIG_IGN); + OldUmask = umask(022); + FullName = getextenv("NAME"); ++ if (FullName != NULL) ++ FullName = newstr(FullName); + + /* + ** Initialize name server if it is going to be used. + diff --git a/debian/patches/8.12/8.12.3/maxseq.patch b/debian/patches/8.12/8.12.3/maxseq.patch new file mode 100644 index 0000000..3b2009b --- /dev/null +++ b/debian/patches/8.12/8.12.3/maxseq.patch @@ -0,0 +1,51 @@ +# This is a patch for conf.h to update it to conf.h.new +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c 'conf.h' 'conf.h.new' +Index: ./conf.h +Prereq: 8.560 +*** ./sendmail-8.12.3/sendmail/conf.h Fri Sep 21 19:01:46 2001 +--- ./conf.h.new Wed Oct 10 09:24:41 2001 +*************** +*** 71,76 **** + #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ + #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ +! #define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */ + #if MILTER + # define MAXFILTERS 25 /* max # of milter filters */ + # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */ +--- 71,76 ---- + #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */ + #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */ +! #define MAXMAPSTACK 128 /* max # of stacked or sequenced maps */ + #if MILTER + # define MAXFILTERS 25 /* max # of milter filters */ + # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */ +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Wed Oct 10 09:25:12 2001 +# Generated by : makepatch 2.00_03 +# Recurse directories : Yes +# p 'conf.h' 6809 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Wed Oct 10 09:25:12 2001] #### +#### Patch checksum: 34 1333 28813 #### +#### Checksum: 52 2010 19538 #### diff --git a/debian/patches/8.12/8.12.3/patch.milter.replbody b/debian/patches/8.12/8.12.3/patch.milter.replbody new file mode 100644 index 0000000..6321210 --- /dev/null +++ b/debian/patches/8.12/8.12.3/patch.milter.replbody @@ -0,0 +1,63 @@ +Index: sendmail/bf.c +diff -u sendmail/bf.c:8.52 sendmail/bf.c:8.53 +--- sendmail/bf.c:8.52 Thu Apr 11 14:00:15 2002 ++++ ./sendmail-8.12.3/sendmail/bf.c Sat Apr 13 20:55:07 2002 +@@ -795,11 +795,12 @@ + errno = EINVAL; + return -1; + #else /* NOFTRUNCATE */ ++ if (lseek(bfp->bf_disk_fd, 0, SEEK_SET) < 0) ++ return -1; + return ftruncate(bfp->bf_disk_fd, 0); + #endif /* NOFTRUNCATE */ + } +- else +- return 0; ++ return 0; + } + + /* + +------------------------------------ +Index: sendmail/milter.c +diff -u sendmail/milter.c:8.195 sendmail/milter.c:8.196 +--- sendmail/milter.c:8.195 Thu Apr 11 10:30:29 2002 ++++ ./sendmail-8.12.3/sendmail/milter.c Sat Apr 13 20:55:07 2002 +@@ -2903,8 +2903,6 @@ + { + int err; + +-# if NOFTRUNCATE +- /* XXX: Not much we can do except rewind it */ + err = sm_io_error(e->e_dfp); + (void) sm_io_flush(e->e_dfp, SM_TIME_DEFAULT); + +@@ -2920,16 +2918,26 @@ + /* errno is set implicitly by fseek() before return */ + err = sm_io_seek(e->e_dfp, SM_TIME_DEFAULT, + 0, SEEK_SET); ++ if (err < 0) ++ { ++ MILTER_DF_ERROR("milter_replbody: sm_io_seek %s: %s"); ++ return -1; ++ } ++# if NOFTRUNCATE ++ /* XXX: Not much we can do except rewind it */ ++ errno = EINVAL; ++ MILTER_DF_ERROR("milter_replbody: ftruncate not available on this platform (%s:%s)"); ++ return -1; + # else /* NOFTRUNCATE */ + err = ftruncate(sm_io_getinfo(e->e_dfp, + SM_IO_WHAT_FD, NULL), + 0); +-# endif /* NOFTRUNCATE */ + if (err < 0) + { + MILTER_DF_ERROR("milter_replbody: sm_io ftruncate %s: %s"); + return -1; + } ++# endif /* NOFTRUNCATE */ + } + + if (prevsize > e->e_msgsize) + diff --git a/debian/patches/8.12/8.12.3/proto.m4.8.646 b/debian/patches/8.12/8.12.3/proto.m4.8.646 new file mode 100644 index 0000000..395cbb0 --- /dev/null +++ b/debian/patches/8.12/8.12.3/proto.m4.8.646 @@ -0,0 +1,11 @@ +--- proto.m4- Thu Nov 14 17:01:56 2002 ++++ ./sendmail-8.12.3/cf/m4/proto.m4 Thu Nov 14 17:02:19 2002 +@@ -2228,7 +2228,7 @@ + dnl ${client_resolve} should be OK, so go ahead + R$* $: <@> $&{client_name} + dnl should not be necessary since it has been done for client_addr already +-R<@> $@ RELAY ++#R<@> $@ RELAY + dnl workspace: <@> ${client_name} (not empty) + # pass to name server to make hostname canonical + R<@> $* $=P $:<?> $1 $2 diff --git a/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13 b/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13 new file mode 100644 index 0000000..2c3a283 --- /dev/null +++ b/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13 @@ -0,0 +1,18 @@ +Index: proto.m4 +=================================================================== +RCS file: /cvs/cf/m4/proto.m4,v +retrieving revision 8.649.2.12 +retrieving revision 8.649.2.13 +diff -u -r8.649.2.12 -r8.649.2.13 +--- proto.m4 3 Dec 2002 16:48:37 -0000 8.649.2.12 ++++ ./sendmail-8.12.3/cf/m4/proto.m4 4 Dec 2002 00:12:18 -0000 8.649.2.13 +@@ -1761,6 +1761,9 @@ + dnl workspace: {client_name} $| {client_addr} + R$+ $| $+ $: $>D < $1 > <?> <+ Connect> < $2 > + dnl workspace: <result-of-lookup> <{client_addr}> ++dnl OR $| $+ if client_name is empty ++R $| $+ $: $>A < $1 > <?> <+ Connect> <> empty client_name ++dnl workspace: <result-of-lookup> <{client_addr}> + R<?> <$+> $: $>A < $1 > <?> <+ Connect> <> no: another lookup + dnl workspace: <result-of-lookup> (<>|<{client_addr}>) + R<?> <$*> $: OK found nothing diff --git a/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1 b/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1 new file mode 100644 index 0000000..10516b0 --- /dev/null +++ b/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1 @@ -0,0 +1,17 @@ +Index: recipient.c +=================================================================== +RCS file: /cvs/sendmail/recipient.c,v +retrieving revision 8.330 +retrieving revision 8.330.2.1 +diff -u -r8.330 -r8.330.2.1 +--- ./sendmail-8.12.3/sendmail/recipient.c 29 May 2002 18:20:03 -0000 8.330 ++++ recipient.c 27 Aug 2002 20:21:02 -0000 8.330.2.1 +@@ -679,7 +679,7 @@ + ** the current recipient is marked expensive. + */ + +- if (WILL_BE_QUEUED(e->e_sendmode) || ++ if (UseMSP || WILL_BE_QUEUED(e->e_sendmode) || + (!bitset(EF_SPLIT, e->e_flags) && e->e_ntries == 0 && + FastSplit > 0)) + sortfn = sorthost; diff --git a/debian/patches/8.12/8.12.3/security.parsaddr b/debian/patches/8.12/8.12.3/security.parsaddr new file mode 100644 index 0000000..90daf45 --- /dev/null +++ b/debian/patches/8.12/8.12.3/security.parsaddr @@ -0,0 +1,58 @@ +diff -u -Nur --exclude CVS sendmail-8.12.3.orig/sendmail/parseaddr.c sendmail-8.12.3/sendmail/parseaddr.c +--- sendmail-8.12.3.orig/sendmail/parseaddr.c 2003-04-01 20:52:13.000000000 +0200 ++++ sendmail-8.12.3/sendmail/parseaddr.c 2003-04-04 15:59:07.000000000 +0200 +@@ -608,7 +608,7 @@ + }; + + +-#define NOCHAR -1 /* signal nothing in lookahead token */ ++#define NOCHAR (-1) /* signal nothing in lookahead token */ + + char ** + prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) +@@ -694,6 +694,7 @@ + /* see if there is room */ + if (q >= &pvpbuf[pvpbsize - 5]) + { ++ addrtoolong: + usrerr("553 5.1.1 Address too long"); + if (strlen(addr) > MAXNAME) + addr[MAXNAME] = '\0'; +@@ -705,11 +706,15 @@ + } + + /* squirrel it away */ ++#if !ALLOW_255 ++ if ((char) c == (char) -1 && !tTd(82, 101)) ++ c &= 0x7f; ++#endif /* !ALLOW_255 */ + *q++ = c; + } + + /* read a new input character */ +- c = *p++; ++ c = (unsigned char)*p++; + if (c == '\0') + { + /* diagnose and patch up bad syntax */ +@@ -764,6 +769,9 @@ + } + else if (c != '!' || state == QST) + { ++ /* see if there is room */ ++ if (q >= &pvpbuf[pvpbsize - 5]) ++ goto addrtoolong; + *q++ = '\\'; + continue; + } +@@ -849,6 +857,10 @@ + /* new token */ + if (tok != q) + { ++ /* see if there is room */ ++ if (q >= &pvpbuf[pvpbsize - 5]) ++ goto addrtoolong; ++ + *q++ = '\0'; + if (tTd(22, 36)) + { diff --git a/debian/patches/sendmail.8.9.3.security.cr.patch b/debian/patches/8.12/8.12.3/sendmail.8.12.security.cr.patch index 394ddf6..0e62081 100644 --- a/debian/patches/sendmail.8.9.3.security.cr.patch +++ b/debian/patches/8.12/8.12.3/sendmail.8.12.security.cr.patch @@ -1,25 +1,17 @@ -Index: headers.c -=================================================================== -RCS file: /cvs/sendmail/headers.c,v -retrieving revision 8.139 -retrieving revision 8.139.2.1 -diff -u -w -r8.139 -r8.139.2.1 ---- src/headers.c 7 Feb 1999 07:26:37 -0000 8.139 -+++ src/headers.c 20 Jan 2003 18:51:34 -0000 8.139.2.1 -@@ -501,9 +501,10 @@ +--- sendmail/headers.c 13 Jan 2003 19:30:28 -0000 8.266.4.3 ++++ ./sendmail-8.12.3/sendmail/headers.c 16 Jan 2003 23:31:17 -0000 +@@ -676,8 +676,8 @@ + if (buf[0] != '\0') { if (bitset(H_FROM, h->h_flags)) - { -- extern char *crackaddr __P((char *)); -+ extern char *crackaddr __P((char *, ENVELOPE *)); - -- expand(crackaddr(buf), buf, sizeof buf, e); -+ expand(crackaddr(buf, e), buf, -+ sizeof buf, e); - } - h->h_value = newstr(buf); +- expand(crackaddr(buf), buf, sizeof buf, +- e); ++ expand(crackaddr(buf, e), ++ buf, sizeof buf, e); + h->h_value = sm_rpool_strdup_x(e->e_rpool, buf); h->h_flags &= ~H_DEFAULT; -@@ -803,7 +804,11 @@ + } +@@ -998,7 +998,11 @@ ** it and replaces it with "$g". The parse is totally ad hoc ** and isn't even guaranteed to leave something syntactically ** identical to what it started with. However, it does leave @@ -32,7 +24,7 @@ diff -u -w -r8.139 -r8.139.2.1 ** ** This algorithm has been cleaned up to handle a wider range ** of cases -- notably quoted and backslash escaped strings. -@@ -812,6 +817,7 @@ +@@ -1007,6 +1011,7 @@ ** ** Parameters: ** addr -- the address to be cracked. @@ -40,7 +32,7 @@ diff -u -w -r8.139 -r8.139.2.1 ** ** Returns: ** a pointer to the new version. -@@ -824,28 +830,50 @@ +@@ -1019,28 +1024,50 @@ ** be copied if it is to be reused. */ @@ -80,10 +72,10 @@ diff -u -w -r8.139 -r8.139.2.1 - bool qmode; - bool realqmode; - bool skipping; -- bool putgmac = FALSE; -- bool quoteit = FALSE; -- bool gotangle = FALSE; -- bool gotcolon = FALSE; +- bool putgmac = false; +- bool quoteit = false; +- bool gotangle = false; +- bool gotcolon = false; + int cmtlev; /* comment level in input string */ + int realcmtlev; /* comment level in output string */ + int anglelev; /* angle level in input string */ @@ -92,10 +84,10 @@ diff -u -w -r8.139 -r8.139.2.1 + bool addangle; /* put closing angle in output */ + bool qmode; /* quoting in original string? */ + bool realqmode; /* quoting in output string? */ -+ bool putgmac = FALSE; /* already wrote $g */ -+ bool quoteit = FALSE; /* need to quote next character */ -+ bool gotangle = FALSE; /* found first '<' */ -+ bool gotcolon = FALSE; /* found a ':' */ ++ bool putgmac = false; /* already wrote $g */ ++ bool quoteit = false; /* need to quote next character */ ++ bool gotangle = false; /* found first '<' */ ++ bool gotcolon = false; /* found a ':' */ register char *bp; char *buflim; char *bufhead; @@ -104,7 +96,7 @@ diff -u -w -r8.139 -r8.139.2.1 static char buf[MAXNAME + 1]; if (tTd(33, 1)) -@@ -860,25 +888,22 @@ +@@ -1055,25 +1082,22 @@ ** adjusted later if we find them. */ @@ -115,8 +107,8 @@ diff -u -w -r8.139 -r8.139.2.1 - copylev = anglelev = realanglelev = cmtlev = realcmtlev = 0; + copylev = anglelev = cmtlev = realcmtlev = 0; bracklev = 0; -- qmode = realqmode = FALSE; -+ qmode = realqmode = addangle = FALSE; +- qmode = realqmode = false; ++ qmode = realqmode = addangle = false; while ((c = *p++) != '\0') { @@ -137,7 +129,7 @@ diff -u -w -r8.139 -r8.139.2.1 /* check for backslash escapes */ if (c == '\\') -@@ -893,8 +918,8 @@ +@@ -1088,8 +1112,8 @@ p--; goto putg; } @@ -148,7 +140,7 @@ diff -u -w -r8.139 -r8.139.2.1 goto putg; } -@@ -902,8 +927,14 @@ +@@ -1097,8 +1121,14 @@ if (c == '"' && cmtlev <= 0) { qmode = !qmode; @@ -164,7 +156,7 @@ diff -u -w -r8.139 -r8.139.2.1 continue; } if (qmode) -@@ -915,15 +946,15 @@ +@@ -1110,15 +1140,15 @@ cmtlev++; /* allow space for closing paren */ @@ -183,7 +175,7 @@ diff -u -w -r8.139 -r8.139.2.1 } } } -@@ -933,7 +964,7 @@ +@@ -1128,7 +1158,7 @@ { cmtlev--; copylev--; @@ -192,7 +184,7 @@ diff -u -w -r8.139 -r8.139.2.1 { realcmtlev--; buflim++; -@@ -944,7 +975,7 @@ +@@ -1139,7 +1169,7 @@ else if (c == ')') { /* syntax error: unmatched ) */ @@ -201,7 +193,7 @@ diff -u -w -r8.139 -r8.139.2.1 bp--; } -@@ -962,7 +993,7 @@ +@@ -1157,7 +1187,7 @@ /* ** Check for DECnet phase IV ``::'' (host::user) @@ -210,10 +202,10 @@ diff -u -w -r8.139 -r8.139.2.1 ** covers ``user@DEC:.tay.myhost'' and ** ``DEC:.tay.myhost::user'' syntaxes (bletch). */ -@@ -971,10 +1002,10 @@ +@@ -1166,10 +1196,10 @@ { if (cmtlev <= 0 && !qmode) - quoteit = TRUE; + quoteit = true; - if (copylev > 0 && !skipping) + if (copylev > 0) { @@ -224,7 +216,7 @@ diff -u -w -r8.139 -r8.139.2.1 } p++; goto putg; -@@ -985,41 +1016,43 @@ +@@ -1180,41 +1210,43 @@ bp = bufhead; if (quoteit) { @@ -243,11 +235,11 @@ diff -u -w -r8.139 -r8.139.2.1 { c = *q++; - if (bp < buflim) -- { - if (quoteit && c == '"') ++ if (quoteit && c == '"') + { +- if (quoteit && c == '"') - *bp++ = '\\'; - *bp++ = c; -+ { + SM_APPEND_CHAR('\\'); + SM_APPEND_CHAR(c); } @@ -280,9 +272,9 @@ diff -u -w -r8.139 -r8.139.2.1 + p++; + } copylev = 0; - putgmac = quoteit = FALSE; + putgmac = quoteit = false; bufhead = bp; -@@ -1028,10 +1061,7 @@ +@@ -1223,10 +1255,7 @@ } if (c == ';' && copylev <= 0 && !ColonOkInAddr) @@ -294,7 +286,7 @@ diff -u -w -r8.139 -r8.139.2.1 /* check for characters that may have to be quoted */ if (strchr(MustQuoteChars, c) != NULL) -@@ -1059,42 +1089,45 @@ +@@ -1254,42 +1283,45 @@ /* oops -- have to change our mind */ anglelev = 1; @@ -304,7 +296,7 @@ diff -u -w -r8.139 -r8.139.2.1 + { + if (!addangle) + buflim--; -+ addangle = TRUE; ++ addangle = true; + } bp = bufhead; @@ -325,11 +317,11 @@ diff -u -w -r8.139 -r8.139.2.1 { c = *q++; - if (bp < buflim) -- { - if (quoteit && c == '"') ++ if (quoteit && c == '"') + { +- if (quoteit && c == '"') - *bp++ = '\\'; - *bp++ = c; -+ { + SM_APPEND_CHAR('\\'); + SM_APPEND_CHAR(c); } @@ -353,8 +345,8 @@ diff -u -w -r8.139 -r8.139.2.1 + SM_APPEND_CHAR(c); } copylev = 0; - putgmac = quoteit = FALSE; -@@ -1106,13 +1139,14 @@ + putgmac = quoteit = false; +@@ -1301,13 +1333,14 @@ if (anglelev > 0) { anglelev--; @@ -362,9 +354,10 @@ diff -u -w -r8.139 -r8.139.2.1 + if (SM_HAVE_ROOM) { - realanglelev--; +- buflim++; + if (addangle) - buflim++; -+ addangle = FALSE; ++ buflim++; ++ addangle = false; } } - else if (!skipping) @@ -372,7 +365,7 @@ diff -u -w -r8.139 -r8.139.2.1 { /* syntax error: unmatched > */ if (copylev > 0) -@@ -1121,7 +1155,7 @@ +@@ -1316,7 +1349,7 @@ continue; } if (copylev++ <= 0) @@ -381,7 +374,7 @@ diff -u -w -r8.139 -r8.139.2.1 continue; } -@@ -1129,30 +1163,42 @@ +@@ -1324,30 +1357,42 @@ putg: if (copylev <= 0 && !putgmac) { @@ -393,7 +386,7 @@ diff -u -w -r8.139 -r8.139.2.1 + SM_APPEND_CHAR(' '); + SM_APPEND_CHAR(MACROEXPAND); + SM_APPEND_CHAR('g'); - putgmac = TRUE; + putgmac = true; } } @@ -411,7 +404,7 @@ diff -u -w -r8.139 -r8.139.2.1 + *bp = '\0'; + if (bp < bufend) + goto success; - ++ + returng: + /* String too long, punt */ + buf[0] = '<'; @@ -421,62 +414,32 @@ diff -u -w -r8.139 -r8.139.2.1 + buf[4]= '\0'; + sm_syslog(LOG_ALERT, e->e_id, + "Dropped invalid comments from header address"); -+ + + success: if (tTd(33, 1)) { - printf("crackaddr=>`"); + sm_dprintf("crackaddr=>`"); xputs(buf); - printf("'\n"); + sm_dprintf("'\n"); } - - return (buf); + return buf; } - /* -Index: main.c -=================================================================== -RCS file: /cvs/sendmail/main.c,v -retrieving revision 8.326 -retrieving revision 8.326.2.2 -diff -u -w -r8.326 -r8.326.2.2 ---- src/main.c 7 Feb 1999 07:43:59 -0000 8.326 -+++ src/main.c 20 Jan 2003 18:51:34 -0000 8.326.2.2 -@@ -2349,7 +2349,7 @@ - static int tryflags = RF_COPYNONE; - char exbuf[MAXLINE]; - extern bool invalidaddr __P((char *, char *)); -- extern char *crackaddr __P((char *)); -+ extern char *crackaddr __P((char *, ENVELOPE *)); - extern void dump_class __P((STAB *, int)); - extern void translate_dollars __P((char *)); - extern void help __P((char *)); -@@ -2671,7 +2671,7 @@ - printf("Usage: /parse address\n"); + /* +--- sendmail/main.c 8 Jan 2003 23:09:59 -0000 8.887.2.17 ++++ ./sendmail-8.12.3/sendmail/main.c 14 Jan 2003 02:38:58 -0000 +@@ -4423,7 +4423,7 @@ + "Usage: /parse address\n"); return; } - q = crackaddr(p); + q = crackaddr(p, e); - printf("Cracked address = "); + (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, + "Cracked address = "); xputs(q); - printf("\nParsing %s %s address\n", -Index: parseaddr.c -=================================================================== -RCS file: /cvs/sendmail/parseaddr.c,v -retrieving revision 8.159 -retrieving revision 8.159.2.1 -diff -u -w -r8.159 -r8.159.2.1 ---- src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159 -+++ src/parseaddr.c 20 Jan 2003 18:51:35 -0000 8.159.2.1 -@@ -2053,7 +2053,7 @@ - static char buf[MAXNAME + 1]; - char lbuf[MAXNAME + 1]; - char pvpbuf[PSBUFSIZE]; -- extern char *crackaddr __P((char *)); -+ extern char *crackaddr __P((char *, ENVELOPE *)); - - if (tTd(12, 1)) - printf("remotename(%s)\n", name); -@@ -2076,7 +2076,7 @@ +--- sendmail/parseaddr.c 26 Sep 2002 23:03:39 -0000 8.359.2.3 ++++ ./sendmail-8.12.3/sendmail/parseaddr.c 14 Jan 2003 02:38:58 -0000 +@@ -2509,7 +2509,7 @@ if (bitset(RF_CANONICAL, flags) || bitnset(M_NOCOMMENT, m->m_flags)) fancy = "\201g"; else @@ -485,3 +448,15 @@ diff -u -w -r8.159 -r8.159.2.1 /* ** Turn the name into canonical form. +--- sendmail/sendmail.h 12 Dec 2002 22:46:35 -0000 8.919.2.15 ++++ ./sendmail-8.12.3/sendmail/sendmail.h 14 Jan 2003 02:38:58 -0000 +@@ -394,7 +394,7 @@ + + /* functions */ + extern void cataddr __P((char **, char **, char *, int, int)); +-extern char *crackaddr __P((char *)); ++extern char *crackaddr __P((char *, ENVELOPE *)); + extern bool emptyaddr __P((ADDRESS *)); + extern ADDRESS *getctladdr __P((ADDRESS *)); + extern int include __P((char *, bool, ADDRESS *, ADDRESS **, int, ENVELOPE *)); + diff --git a/debian/patches/8.12/8.12.3/smrsh-20020924.patch b/debian/patches/8.12/8.12.3/smrsh-20020924.patch new file mode 100644 index 0000000..d9f4c93 --- /dev/null +++ b/debian/patches/8.12/8.12.3/smrsh-20020924.patch @@ -0,0 +1,63 @@ +Index: smrsh.c +=================================================================== +RCS file: /cvs/smrsh/smrsh.c,v +retrieving revision 8.58 +diff -u -r8.58 smrsh.c +--- ./sendmail-8.12.3/smrsh/smrsh.c 25 May 2002 02:41:31 -0000 8.58 ++++ smrsh.c 24 Sep 2002 23:58:16 -0000 +@@ -57,6 +57,8 @@ + #include <sm/limits.h> + #include <sm/string.h> + #include <sys/file.h> ++#include <sys/types.h> ++#include <sys/stat.h> + #include <string.h> + #include <ctype.h> + #include <errno.h> +@@ -145,6 +147,7 @@ + char *newenv[2]; + char pathbuf[1000]; + char specialbuf[32]; ++ struct stat st; + + #ifndef DEBUG + # ifndef LOG_MAIL +@@ -302,6 +305,38 @@ + (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, + "Trying %s\n", cmdbuf); + #endif /* DEBUG */ ++ if (stat(cmdbuf, &st) < 0) ++ { ++ /* can't stat it */ ++ (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, ++ "%s: %s not available for sendmail programs (stat failed)\n", ++ prg, cmd); ++ if (p != NULL) ++ *p = ' '; ++#ifndef DEBUG ++ syslog(LOG_CRIT, "uid %d: attempt to use %s (stat failed)", ++ (int) getuid(), cmd); ++#endif /* ! DEBUG */ ++ exit(EX_UNAVAILABLE); ++ } ++ if (!S_ISREG(st.st_mode) ++#ifdef S_ISLNK ++ && !S_ISLNK(st.st_mode) ++#endif /* S_ISLNK */ ++ ) ++ { ++ /* can't stat it */ ++ (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, ++ "%s: %s not available for sendmail programs (not a file)\n", ++ prg, cmd); ++ if (p != NULL) ++ *p = ' '; ++#ifndef DEBUG ++ syslog(LOG_CRIT, "uid %d: attempt to use %s (not a file)", ++ (int) getuid(), cmd); ++#endif /* ! DEBUG */ ++ exit(EX_UNAVAILABLE); ++ } + if (access(cmdbuf, X_OK) < 0) + { + /* oops.... crack attack possiblity */ diff --git a/debian/patches/8.12/8.12.3/socks.patch b/debian/patches/8.12/8.12.3/socks.patch new file mode 100644 index 0000000..61b3046 --- /dev/null +++ b/debian/patches/8.12/8.12.3/socks.patch @@ -0,0 +1,50 @@ +# This is a patch for conf.c to update it to conf.c.new +# +# To apply this patch: +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'applypatch' program with this patch file as input. +# +# If you do not have 'applypatch', it is part of the 'makepatch' package +# that you can fetch from the Comprehensive Perl Archive Network: +# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz +# In the above URL, 'x' should be 2 or higher. +# +# To apply this patch without the use of 'applypatch': +# STEP 1: Chdir to the source directory. +# STEP 2: Run the 'patch' program with this file as input. +# +#### End of Preamble #### + +#### Patch data follows #### +diff -c 'conf.c' 'conf.c.new' +Index: ./conf.c +Prereq: 8.961 +*** ./sendmail-8.12.3/sendmail/conf.c Thu May 17 14:19:41 2001 +--- ./sendmail/conf.c.new Wed May 23 13:01:15 2001 +*************** +*** 3760,3765 **** +--- 3760,3770 ---- + vendor_post_defaults(e) + ENVELOPE *e; + { ++ char *p; ++ if ((p = getenv("LD_PRELOAD"))) ++ setuserenv("LD_PRELOAD", p); ++ if ((p = getenv("LD_LIBRARY_PATH"))) ++ setuserenv("LD_LIBRARY_PATH", p); + #ifdef __QNX__ + char *p; + +#### End of Patch data #### + +#### ApplyPatch data follows #### +# Data version : 1.0 +# Date generated : Wed May 23 13:02:56 2001 +# Generated by : makepatch 2.00_03 +# Recurse directories : Yes +# p 'conf.c' 130464 +#### End of ApplyPatch data #### + +#### End of Patch kit [created: Wed May 23 13:02:56 2001] #### +#### Patch checksum: 30 772 52154 #### +#### Checksum: 48 1448 42818 #### diff --git a/debian/patches/Makefile b/debian/patches/Makefile deleted file mode 100644 index 847f7a9..0000000 --- a/debian/patches/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# -# This file is also based upon prior sendmail makefiles -# -# Richard Nelson <cowboy@debian.org> - - -#------------- -create: - diff -cr ../../cf/m4/proto.m4 proto.m4 > patch.ldap.m4 || /bin/true - #diff -cr ../../cf/mailer/local.m4 local.m4 > patch.dont_masquerade_local || /bin/true - #diff -cr ../../cf/feature/local_procmail.m4 local_procmail.m4 > patch.local_procmail || /bin/true - #diff -cr ../../src/conf.h conf.h > patch.IP_SRCROUTE || /bin/true - #diff -cr ../../src/daemon.c daemon.c >> patch.IP_SRCROUTE || /bin/true - -patch: - patch -p1 --version-control=never -l < debian/patches/mime-patch - patch -p5 --version-control=never < debian/patches/mrbl.p3 - patch -p3 --version-control=never < debian/patches/patch.local_procmail - patch -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE - patch -p2 --version-control=never < debian/patches/patch.dont_masquerade_local - patch -p2 --version-control=never < debian/patches/patch.ldap.m4 - cd src && patch -p0 --version-control=never < ../debian/patches/patch.ldap.src - cd rmail && patch -p0 --version-control=never < ../debian/patches/patch.rmail - cd src && patch -p0 --version-control=never < ../debian/patches/patch.DOS - patch -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4 - patch -p0 --version-control=never -l < debian/patches/patch.mail.local - patch -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch - patch -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch - - -unpatch: - patch -R -p1 --version-control=never -l < debian/patches/mime-patch - patch -R -p5 --version-control=never < debian/patches/mrbl.p3 - patch -R -p3 --version-control=never < debian/patches/patch.local_procmail - patch -R -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE - patch -R -p2 --version-control=never < debian/patches/patch.dont_masquerade_local - patch -R -p2 --version-control=never < debian/patches/patch.ldap.m4 - cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.ldap.src - cd rmail && patch -R -p0 --version-control=never < ../debian/patches/patch.rmail - cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.DOS - patch -R -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4 - patch -R -p0 --version-control=never -l < debian/patches/patch.mail.local - patch -R -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch - patch -R -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch - -#------------- -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/patches/align.893.p1 b/debian/patches/align.893.p1 deleted file mode 100644 index ff6add3..0000000 --- a/debian/patches/align.893.p1 +++ /dev/null @@ -1,17 +0,0 @@ ---- ./src/main.c.ORIG Sun Jan 10 00:31:13 1999 -+++ sendmail-8.9.3/src/main.c Sat Oct 30 04:29:25 1999 -@@ -528,10 +528,12 @@ - { - for (i = 0; hp->h_addr_list[i] != NULL; i++) - { -+ struct in_addr ia; - char ipbuf[103]; - -+ bcopy(hp->h_addr_list[i], &ia, INADDRSZ); - snprintf(ipbuf, sizeof ipbuf, "[%.100s]", -- inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); -+ inet_ntoa(ia)); - if (tTd(0, 4)) - printf("\ta.k.a.: %s\n", ipbuf); - setclass('w', ipbuf); - diff --git a/debian/patches/contrib/etrn.patch01 b/debian/patches/contrib/etrn.patch01 new file mode 100644 index 0000000..616c748 --- /dev/null +++ b/debian/patches/contrib/etrn.patch01 @@ -0,0 +1,42 @@ +--- sendmail-8.12.5/contrib/etrn.pl.mwe Tue Jul 9 11:17:50 2002 ++++ sendmail-8.12.5/contrib/etrn.pl Tue Jul 9 11:33:13 2002 +@@ -81,12 +81,13 @@ + while (<CF>){ + if (/^Fw.*$/){ # look for a line starting with "Fw" + $cwfile = $_; +- chop($cwfile); +- $optional = /^Fw-o/; +- $cwfile =~ s,^Fw[^/]*,,; # extract the file name +- ++ chomp($cwfile); ++ ($optional,$cwfile,$comment_delim) = /^Fw(-o)?\s*(\S*)\s*(?:\s%(.*))?$/; ++ if (!$comment_delim) $comment_delim = '[^#]'; ++ $comment_delim =~ s/[\\](.)/$1/g; # unescape + if (-r $cwfile) { +- push (@cwfiles, $cwfile); ++ push (@cwfiles, {'file' => $cwfile, 'nocomment' => $comment_delim}); ++ + } else { + die "$cwfile is not readable" unless $optional; + } +@@ -103,16 +104,16 @@ + + for $cwfile (@cwfiles) { + $0 = "$av0 - reading $cwfile"; +- if (open(CW, "<$cwfile")){ ++ if (open(CW, "<$cwfile->{'file'}")){ + while (<CW>){ +- next if /^\#/; ++ next unless /^$cwfile->{'nocomment'}/; + $thishost = $_; +- chop($thishost); ++ chomp($thishost); + push(@hosts, $thishost) unless $thishost =~ $hostname; + } + close(CW); + } else { +- die "open $cwfile: $!"; ++ die "open $cwfile->{'file'}: $!"; + } + } + } diff --git a/debian/patches/mime-patch b/debian/patches/mime-patch deleted file mode 100644 index cf939b2..0000000 --- a/debian/patches/mime-patch +++ /dev/null @@ -1,62 +0,0 @@ -*** sendmail-8.9.3/src/mime.c.ORIG Tue Jan 19 01:35:11 1999 ---- sendmail-8.9.3/src/mime.c Sat Mar 13 01:39:15 1999 -*************** -*** 443,449 **** - { - /* no encoding necessary */ - if (cte != NULL && -! bitset(MCIF_INMIME, mci->mci_flags) && - !bitset(M87F_NO8TO7, flags)) - { - /* ---- 443,450 ---- - { - /* no encoding necessary */ - if (cte != NULL && -! bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, -! mci->mci_flags) && - !bitset(M87F_NO8TO7, flags)) - { - /* -*** sendmail-8.9.3/src/headers.c.ORIG Tue Jan 26 15:54:50 1999 ---- sendmail-8.9.3/src/headers.c Tue Mar 16 20:43:31 1999 -*************** -*** 1369,1375 **** - - /* - ** If we are converting this to a MIME message, add the -! ** MIME headers. - */ - - #if MIME8TO7 ---- 1369,1375 ---- - - /* - ** If we are converting this to a MIME message, add the -! ** MIME headers (but not in MIME mode!). - */ - - #if MIME8TO7 -*************** -*** 1377,1386 **** - bitset(EF_HAS8BIT, e->e_flags) && - !bitset(EF_DONT_MIME, e->e_flags) && - !bitnset(M_8BITS, mci->mci_mailer->m_flags) && -! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8, mci->mci_flags)) - { -! if (hvalue("MIME-Version", e->e_header) == NULL) -! putline("MIME-Version: 1.0", mci); - if (hvalue("Content-Type", e->e_header) == NULL) - { - snprintf(obuf, sizeof obuf, ---- 1377,1386 ---- - bitset(EF_HAS8BIT, e->e_flags) && - !bitset(EF_DONT_MIME, e->e_flags) && - !bitnset(M_8BITS, mci->mci_mailer->m_flags) && -! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, mci->mci_flags) && -! hvalue("MIME-Version", e->e_header) == NULL) - { -! putline("MIME-Version: 1.0", mci); - if (hvalue("Content-Type", e->e_header) == NULL) - { - snprintf(obuf, sizeof obuf, diff --git a/debian/patches/mime-patch.README b/debian/patches/mime-patch.README deleted file mode 100644 index e73635b..0000000 --- a/debian/patches/mime-patch.README +++ /dev/null @@ -1,31 +0,0 @@ -From: per@erix.ericsson.se (Per Hedeland) -Newsgroups: news.software.nntp,comp.mail.sendmail -Subject: Re: Duplicate "Content-Transfer-Encoding" header -Date: 13 Apr 1999 01:21:51 GMT -Organization: Ericsson Utvecklings AB, Stockholm, Sweden -Lines: 61 -Message-ID: <7eu67f$p6b$1@news.du.etx.ericsson.se> -References: <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk> -NNTP-Posting-Host: super.du.etx.ericsson.se -NNTP-Posting-User: per -X-Newsreader: trn 4.0-test69 (20 September 1998) -Xref: news.cistron.nl news.software.nntp:47781 comp.mail.sendmail:68808 - -In article <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk> ggibbs@hgmp.mrc.ac.uk -(Geoff Gibbs) writes: ->I have a mail/news gateway running, using the mailpost/news2mail ->software which comes with INN 2.2. ->It is being fed from sendmail 8.9.1a -> ->I am seeing the error message :- -> ->post failed Duplicate "Content-Transfer-Encoding" header - -Upgrade to sendmail 8.9.3 + the patch below. Of course the duplicate -header may have been introduced *before* the message arrived at *your* -sendmail, in which case this won't help - but at least your sendmail -won't be the cause. - ---Per Hedeland -per@erix.ericsson.se - diff --git a/debian/patches/mrbl.p3 b/debian/patches/mrbl.p3 deleted file mode 100644 index f73d239..0000000 --- a/debian/patches/mrbl.p3 +++ /dev/null @@ -1,168 +0,0 @@ -diff -cr ./feature/rbl.m4 /home/ca/smi/sendmail/cf/feature/rbl.m4 -*** ./feature/rbl.m4 Tue Dec 29 09:42:13 1998 ---- /home/ca/smi/sendmail/cf/feature/rbl.m4 Sat Feb 20 13:58:31 1999 -*************** -*** 1,6 **** - divert(-1) - # -! # Copyright (c) 1998 Sendmail, Inc. All rights reserved. - # - # By using this file, you agree to the terms and conditions set - # forth in the LICENSE file which can be found at the top level of ---- 1,7 ---- - divert(-1) - # -! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. -! # All rights reserved. - # - # By using this file, you agree to the terms and conditions set - # forth in the LICENSE file which can be found at the top level of -*************** -*** 9,15 **** - # - - divert(0) -! VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/1998') - divert(-1) -! -! define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl ---- 10,24 ---- - # - - divert(0) -! ifdef(`_RBL_R_',`dnl',`dnl -! VERSIONID(`$Id: rbl.m4,v 8.12 1999/02/20 21:58:31 ca Exp $')') - divert(-1) -! define(`_RBL_SRV_',ifelse(_ARG_,`',`rbl.maps.vix.com',_ARG_))dnl -! define(`_RBL_MSG_',ifelse(_ARG2_,`',`"Mail from " $`'&{client_addr} " refused by blackhole site '_RBL_SRV_`"',_ARG2_))dnl -! define(`_RBL_R_',defn(`_RBL_R_') -! ` -! # DNS based IP address spam list '_RBL_SRV_` -! R$`'* $`': $`'&{client_addr} -! R$`'-.$`'-.$`'-.$`'- $`': <?> $`'(host $`'4.$`'3.$`'2.$`'1.'_RBL_SRV_`. $`': OK $`') -! R<?>OK $`': OKSOFAR -! R<?>$`'+ $`'#error $`'@ 5.7.1 $`': '_RBL_MSG_) -diff -cr ./m4/cfhead.m4 /home/ca/smi/sendmail/cf/m4/cfhead.m4 -*** ./m4/cfhead.m4 Tue Dec 29 09:42:08 1998 ---- /home/ca/smi/sendmail/cf/m4/cfhead.m4 Sat Feb 20 13:58:32 1999 -*************** -*** 1,5 **** - # -! # Copyright (c) 1998 Sendmail, Inc. All rights reserved. - # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. - # Copyright (c) 1988, 1993 - # The Regents of the University of California. All rights reserved. ---- 1,6 ---- - # -! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. -! # All rights reserved. - # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. - # Copyright (c) 1988, 1993 - # The Regents of the University of California. All rights reserved. -*************** -*** 40,51 **** - define(`__OSTYPE__', $1) - define(`_ARG_', $2) - include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') - define(`MAILER', - `ifdef(`_MAILER_$1_', `dnl`'', - `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') -! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') -! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') -! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') - define(`VERSIONID', ``##### $1 #####'') - define(`LOCAL_RULE_0', `divert(3)') - define(`LOCAL_RULE_1', ---- 41,73 ---- - define(`__OSTYPE__', $1) - define(`_ARG_', $2) - include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'') -+ ## new FEATUREs -+ define(`_RBL_R_',`') -+ ## access to further arguments in FEATURE/HACK -+ define(`_ACC_ARG_1_',`$1') -+ define(`_ACC_ARG_2_',`$2') -+ define(`_ACC_ARG_3_',`$3') -+ define(`_ACC_ARG_4_',`$4') -+ define(`_ACC_ARG_5_',`$5') -+ define(`_ACC_ARG_6_',`$6') -+ define(`_ACC_ARG_7_',`$7') -+ define(`_ACC_ARG_8_',`$8') -+ define(`_ACC_ARG_9_',`$9') -+ define(`_ARG1_',`_ACC_ARG_1_(_ARGS_)') -+ define(`_ARG2_',`_ACC_ARG_2_(_ARGS_)') -+ define(`_ARG3_',`_ACC_ARG_3_(_ARGS_)') -+ define(`_ARG4_',`_ACC_ARG_4_(_ARGS_)') -+ define(`_ARG5_',`_ACC_ARG_5_(_ARGS_)') -+ define(`_ARG6_',`_ACC_ARG_6_(_ARGS_)') -+ define(`_ARG7_',`_ACC_ARG_7_(_ARGS_)') -+ define(`_ARG8_',`_ACC_ARG_8_(_ARGS_)') -+ define(`_ARG9_',`_ACC_ARG_9_(_ARGS_)') - define(`MAILER', - `ifdef(`_MAILER_$1_', `dnl`'', - `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')') -! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', `$2')include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'') -! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'') -! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'') - define(`VERSIONID', ``##### $1 #####'') - define(`LOCAL_RULE_0', `divert(3)') - define(`LOCAL_RULE_1', -diff -cr ./m4/proto.m4 /home/ca/smi/sendmail/cf/m4/proto.m4 -*** ./m4/proto.m4 Tue Feb 2 15:21:30 1999 ---- /home/ca/smi/sendmail/cf/m4/proto.m4 Sat Feb 20 13:58:33 1999 -*************** -*** 1,6 **** - divert(-1) - # -! # Copyright (c) 1998 Sendmail, Inc. All rights reserved. - # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. - # Copyright (c) 1988, 1993 - # The Regents of the University of California. All rights reserved. ---- 1,7 ---- - divert(-1) - # -! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. -! # All rights reserved. - # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. - # Copyright (c) 1988, 1993 - # The Regents of the University of California. All rights reserved. -*************** -*** 12,18 **** - # - divert(0) - -! VERSIONID(`@(#)proto.m4 8.243 (Berkeley) 2/2/1999') - - MAILER(local)dnl - ---- 13,19 ---- - # - divert(0) - -! VERSIONID(`$Id: proto.m4,v 8.247 1999/02/20 21:58:33 ca Exp $') - - MAILER(local)dnl - -*************** -*** 1108,1120 **** - R<DISCARD> $* $#discard $: discard - R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') - -! ifdef(`_RBL_', `dnl -! # DNS based IP address spam lists -! R$* $: $&{client_addr} -! R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $) -! ROK $@ OK -! R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused by blackhole site _RBL_"', -! `dnl') - - ###################################################################### - ### check_mail -- check SMTP ``MAIL FROM:'' command argument ---- 1109,1115 ---- - R<DISCARD> $* $#discard $: discard - R<$+> $* $#error $@ 5.7.1 $: $1', `dnl') - -! _RBL_R_ - - ###################################################################### - ### check_mail -- check SMTP ``MAIL FROM:'' command argument diff --git a/debian/patches/mrbl.p3.README b/debian/patches/mrbl.p3.README deleted file mode 100644 index 313795c..0000000 --- a/debian/patches/mrbl.p3.README +++ /dev/null @@ -1,12 +0,0 @@ - -Upgrade to 8.9.3, and install the multiple rbl patch from: - http://www.Sendmail.ORG/~ca/email/patches/mrbl.p3 - http://www.sendmail.org -Then use - FEATURE(rbl,`rbl.maps.vix.com',` Mail from $&{client_addr} - rejected - rbl; see http://maps.vix.com') - FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr} - rejected - dul; see http://maps.vix.com') - FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr} - rejected - open relay; see http://www.orbs.org') - diff --git a/debian/patches/patch.DOS b/debian/patches/patch.DOS deleted file mode 100644 index 7b595b9..0000000 --- a/debian/patches/patch.DOS +++ /dev/null @@ -1,21 +0,0 @@ ---- main.c~orig Sat Jan 9 15:31:13 1999 -+++ main.c Wed Nov 17 19:04:44 1999 -@@ -984,6 +984,18 @@ - usrerr("Permission denied"); - finis(FALSE, EX_USAGE); - } -+ if (OpMode == MD_INITALIAS && -+ RealUid != 0 && -+ RealUid != TrustedUid && -+ !wordinclass(RealUserName, 't')) -+ { -+ if (LogLevel > 1) -+ sm_syslog(LOG_ALERT, NOQID, -+ "user %d attempted to rebuild the alias map", -+ RealUid); -+ usrerr("Permission denied"); -+ finis(FALSE, EX_USAGE); -+ } - - if (MeToo) - BlankEnvelope.e_flags |= EF_METOO; diff --git a/debian/patches/patch.IP_SRCROUTE b/debian/patches/patch.IP_SRCROUTE deleted file mode 100644 index 84b7ee8..0000000 --- a/debian/patches/patch.IP_SRCROUTE +++ /dev/null @@ -1,94 +0,0 @@ -*** ../../src/conf.h Mon Apr 12 15:12:30 1999 ---- conf.h Thu Apr 8 15:35:20 1999 -*************** -*** 1284,1290 **** - # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ - # define GIDSET_T gid_t /* from <linux/types.h> */ - # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ -! # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ - # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ - # ifndef HASFLOCK - # include <linux/version.h> ---- 1284,1290 ---- - # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ - # define GIDSET_T gid_t /* from <linux/types.h> */ - # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ -! # define IP_SRCROUTE 1 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ - # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ - # ifndef HASFLOCK - # include <linux/version.h> -*** ../../src/daemon.c Mon Apr 12 15:12:30 1999 ---- daemon.c Mon Apr 12 15:37:50 1999 -*************** -*** 42,48 **** - # if IP_SRCROUTE - # include <netinet/in_systm.h> - # include <netinet/ip.h> -! # include <netinet/ip_var.h> - # endif - - /* ---- 42,50 ---- - # if IP_SRCROUTE - # include <netinet/in_systm.h> - # include <netinet/ip.h> -! # ifndef __linux__ -! # include <netinet/ip_var.h> -! # endif - # endif - - /* -*************** -*** 1570,1584 **** - u_char *o; - int l; - struct in_addr addr; - struct ipoption ipopt; -! - ipoptlen = sizeof ipopt; - if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS, - (char *) &ipopt, &ipoptlen) < 0) - goto noipsr; - if (ipoptlen == 0) - goto noipsr; - o = (u_char *) ipopt.ipopt_list; - while (o != NULL && o < (u_char *) &ipopt + ipoptlen) - { - switch (*o) ---- 1572,1593 ---- - u_char *o; - int l; - struct in_addr addr; -+ # ifndef __linux__ - struct ipoption ipopt; -! # else -! struct ip_options ipopt; -! # endif - ipoptlen = sizeof ipopt; - if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS, - (char *) &ipopt, &ipoptlen) < 0) - goto noipsr; - if (ipoptlen == 0) - goto noipsr; -+ # ifndef __linux__ - o = (u_char *) ipopt.ipopt_list; -+ # else -+ o = (u_char *) ipopt.__data; -+ # endif - while (o != NULL && o < (u_char *) &ipopt + ipoptlen) - { - switch (*o) -*************** -*** 1609,1615 **** ---- 1618,1628 ---- - snprintf(p, SPACELEFT(hbuf, p), " [%s@%.*s", - *o == IPOPT_SSRR ? "!" : "", - l > 240 ? 120 : l / 2, -+ # ifndef __linux__ - inet_ntoa(GET_IPOPT_DST(ipopt.ipopt_dst))); -+ # else -+ ipopt.faddr); -+ # endif - i = strlen(p); - p += i; - l -= strlen(p); diff --git a/debian/patches/patch.dont_masquerade_local b/debian/patches/patch.dont_masquerade_local deleted file mode 100644 index f4484b9..0000000 --- a/debian/patches/patch.dont_masquerade_local +++ /dev/null @@ -1,39 +0,0 @@ -diff -cr ../../cf/mailer/local.m4 local.m4 -*** ../../cf/mailer/local.m4 Thu Apr 22 18:23:05 1999 ---- local.m4 Thu Apr 22 18:40:37 1999 -*************** -*** 39,45 **** - 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 - - # - # Envelope recipient rewriting ---- 39,46 ---- - R<@> $n errors to mailer-daemon - R@ <@ $*> $n temporarily bypass Sun bogosity - R$+ $: $>50 $1 add local domain if needed -! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl -! R$* $: $>94 $1 do masquerading') - - # - # Envelope recipient rewriting -*************** -*** 54,60 **** - 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 - - # - # Header recipient rewriting ---- 55,62 ---- - R<@> $n errors to mailer-daemon - R@ <@ $*> $n temporarily bypass Sun bogosity - R$+ $: $>50 $1 add local domain if needed -! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl -! R$* $: $>93 $1 do masquerading') - - # - # Header recipient rewriting diff --git a/debian/patches/patch.ldap.m4 b/debian/patches/patch.ldap.m4 deleted file mode 100644 index 823bc13..0000000 --- a/debian/patches/patch.ldap.m4 +++ /dev/null @@ -1,17 +0,0 @@ -*** ../../cf/m4/proto.m4 Thu Apr 22 18:23:04 1999 ---- proto.m4 Fri Apr 23 11:41:47 1999 -*************** -*** 870,875 **** ---- 870,881 ---- - R< $* . > $+ $: < $1 > $2 strip extra dot', - `dnl') - -+ ifdef(`_LDAP_MAP_', `dnl -+ # Now attempt to lookup in ldap (ldap map) -+ R< $L > $+ $: < $L > $( ldap $1 $) look up user -+ R< $* > $+ @ $+ $: < $3 > $2 Rewrite if forward', -+ `dnl') -+ - # see if we have a relay or a hub - R< > $+ $: < $H > $1 try hub - R< > $+ $: < $R > $1 try relay diff --git a/debian/patches/patch.ldap.src b/debian/patches/patch.ldap.src deleted file mode 100644 index 4b4a4df..0000000 --- a/debian/patches/patch.ldap.src +++ /dev/null @@ -1,377 +0,0 @@ -Index: ldap_map.h -=================================================================== -RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/ldap_map.h,v -retrieving revision 1.1.1.8 -retrieving revision 1.9 -diff -u -r1.1.1.8 -r1.9 ---- ldap_map.h 1999/02/15 19:35:30 1.1.1.8 -+++ ldap_map.h 1999/02/15 20:04:06 1.9 -@@ -37,8 +37,8 @@ - /* args for ldap_bind_s */ - LDAP *ld; - char *binddn; -- char *passwd; -- int method; -+ char *secret; -+ int method; - - /* args for ldap_search_st */ - char *base; -@@ -55,13 +55,32 @@ - #define DEFAULT_LDAP_MAP_PORT LDAP_PORT - #define DEFAULT_LDAP_MAP_SCOPE LDAP_SCOPE_SUBTREE - #define DEFAULT_LDAP_MAP_BINDDN NULL --#define DEFAULT_LDAP_MAP_PASSWD NULL -+#define DEFAULT_LDAP_MAP_SECRET NULL - #define DEFAULT_LDAP_MAP_METHOD LDAP_AUTH_SIMPLE - #define DEFAULT_LDAP_MAP_TIMELIMIT 5 - #define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER - #define DEFAULT_LDAP_MAP_SIZELIMIT 0 - #define DEFAULT_LDAP_MAP_ATTRSONLY 0 - #define LDAP_MAP_MAX_FILTER 1024 -+ -+/* authentication methods available */ -+ -+#define LDAP_MAP_AUTH_METHOD_MAX 3 -+#define LDAP_MAP_MAX_PASSWD 256 -+ -+char *ldap_map_auth_methods[] = { -+ "LDAP_AUTH_NONE", -+ "LDAP_AUTH_SIMPLE", -+ "LDAP_AUTH_KRBV4" -+} ; -+ -+int ldap_map_auth_methods_code[LDAP_MAP_AUTH_METHOD_MAX] = { -+ LDAP_AUTH_NONE, -+ LDAP_AUTH_SIMPLE, -+ LDAP_AUTH_KRBV4 -+} ; -+ -+ - #ifdef LDAP_REFERRALS - # define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS - #else /* LDAP_REFERRALS */ -Index: map.c -=================================================================== -RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/map.c,v -retrieving revision 1.1.1.11 -retrieving revision 1.20 -diff -u -r1.1.1.11 -r1.20 ---- map.c 1999/02/15 19:35:31 1.1.1.11 -+++ map.c 1999/03/30 21:22:41 1.20 -@@ -2621,6 +2621,10 @@ - #endif - return FALSE; - } -+ /* We could call aliaswait here, but it only adds extra -+ code to the ldap map lookup. The aliaswait "@:@" convention -+ does not make much sense in the ldap tcp-based model. -+ */ - return TRUE; - } - -@@ -2647,7 +2651,7 @@ - LDAP_MAP_STRUCT *lmap; - LDAP *ld; - register EVENT *ev = NULL; -- -+ register int bind_result; - if (tTd(38, 2)) - printf("ldap_map_start(%s)\n", map->map_mname); - -@@ -2713,12 +2717,12 @@ - lmap->ld = ld; - return TRUE; - #else -- if (ldap_bind_s(ld, lmap->binddn,lmap->passwd,lmap->method) != LDAP_SUCCESS) -+ if (ldap_bind_s(ld, lmap->binddn,lmap->secret,lmap->method) != LDAP_SUCCESS) - { - if (!bitset(MF_OPTIONAL, map->map_mflags)) - { -- syserr("421 Cannot bind to map %s in ldap server %s", -- map->map_mname, lmap->ldaphost); -+ syserr("421 Cannot bind to map %s in ldap server %s, %s", -+ map->map_mname, lmap->ldaphost,ldap_err2string(bind_result)); - } - } - else -@@ -2727,7 +2731,6 @@ - lmap->ld = ld; - return TRUE; - } -- - return FALSE; - #endif - } -@@ -2811,13 +2814,13 @@ - { - LDAP_MAP_STRUCT *lmap = NULL; - LDAPMessage *entry; -- char *vp; -+ char *vp,*vp_tmp; - auto int vsize; - char keybuf[MAXNAME + 1]; - char filter[LDAP_MAP_MAX_FILTER + 1]; - char **attr_values = NULL; -- char *result; -- int name_len; -+ char *result,*tmp; -+ int name_len,val_count,i; - char *fp, *p, *q; - - if (tTd(38, 20)) -@@ -2899,39 +2902,88 @@ - } - } - -+ result = NULL; -+ *statp = EX_NOTFOUND; -+ - entry = ldap_first_entry(lmap->ld,lmap->res); - if (entry == NULL) - { -- result = NULL; -- *statp = EX_NOTFOUND; - goto quick_exit; - } - -- /* Need to build the args for map_rewrite here */ -- attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]); -- if (attr_values == NULL) -- { -- /* bad things happened */ -- result = NULL; -- *statp = EX_NOTFOUND; -- goto quick_exit; -+ vp = NULL ; -+ -+ /* Cycle through all entries. */ -+ do { -+ /* Need to build the args for map_rewrite here */ -+ attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]); -+ if (attr_values != NULL ) -+ { -+ *statp = EX_OK; -+ -+ /* -+ * If there is more that one munge then into -+ * a comma sep string -+ */ -+ val_count = ldap_count_values(attr_values) ; -+ /* count size */ -+ vsize = 0 ; -+ for( i = 0 ; i < val_count && attr_values[i] != NULL ; i++ ) { -+ vsize += strlen(attr_values[i]) + strlen(", ") ; -+ } -+ vp_tmp = (char * ) malloc(vsize) ; -+ if ( vp_tmp != NULL ) -+ { -+ /* first */ -+ snprintf(vp_tmp,vsize,"%s",attr_values[0]) ; -+ tmp = vp_tmp + strlen(vp_tmp); -+ /*rest */ -+ for( i = 1 ; i < (val_count ) && attr_values[i] != NULL ; i++ ) { -+ snprintf(tmp,(vsize - strlen(vp_tmp)),", %s",attr_values[i]) ; -+ tmp = vp_tmp + strlen(vp_tmp) ; -+ } -+ -+ } else { -+ /* Report memory error */ -+ if (!bitset(MF_OPTIONAL, map->map_mflags)) -+ { -+ syserr("Out of memory in ldap_map_lookup"); -+ } -+ } -+ } -+ if ( vp == NULL ) -+ { -+ vp = vp_tmp ; -+ } else { -+ vsize = strlen(vp) + strlen(vp_tmp) + strlen(", ") + 1 ; -+ tmp = ( char *) malloc( vsize ) ; -+ snprintf(tmp,vsize,"%s, %s",vp,vp_tmp) ; -+ /* Free things in correct order. */ -+ free ( vp_tmp) ; /* vsize malloc above */ -+ vp_tmp = vp ; /* tmp malloc from previous loop */ -+ vp = tmp ; -+ free ( vp_tmp ) ; -+ } -+ ldap_value_free(attr_values); -+ attr_values = NULL ; -+ -+ } while ( (entry = ldap_next_entry( lmap->ld, entry ) ) != NULL ) ; -+ -+ if ( *statp == EX_OK ) { -+ -+ vsize = strlen(vp); -+ -+ if (LogLevel > 9) -+ sm_syslog(LOG_INFO, CurEnv->e_id, -+ "ldap %.100s => %s", -+ name, vp); -+ if (bitset(MF_MATCHONLY, map->map_mflags)) -+ result = map_rewrite(map, name, strlen(name), NULL); -+ else -+ result = map_rewrite(map, vp, vsize, av); -+ free(vp) ; -+ - } -- -- *statp = EX_OK; -- -- /* If there is more that one use the first */ -- vp = attr_values[0]; -- vsize = strlen(vp); -- -- if (LogLevel > 9) -- sm_syslog(LOG_INFO, CurEnv->e_id, -- "ldap %.100s => %s", -- name, vp); -- if (bitset(MF_MATCHONLY, map->map_mflags)) -- result = map_rewrite(map, name, strlen(name), NULL); -- else -- result = map_rewrite(map, vp, vsize, av); -- - quick_exit: - if (attr_values != NULL) - ldap_value_free(attr_values); -@@ -2982,8 +3034,12 @@ - char *args; - { - register char *p = args; -- register int done; -+ register int done,i; - LDAP_MAP_STRUCT *lmap; -+ static char m_tmp[MAXPATHLEN+LDAP_MAP_MAX_PASSWD]; -+ FILE * sfd ; -+ int sff = SFF_OPENASROOT|SFF_ROOTOK|SFF_NOWLINK|SFF_NOWWFILES|SFF_NOGWFILES; -+ char *tmp ; - - /* We need to alloc an LDAP_MAP_STRUCT struct */ - lmap = (LDAP_MAP_STRUCT *) xalloc(sizeof(LDAP_MAP_STRUCT)); -@@ -3002,7 +3058,8 @@ - - /* Default char ptrs to NULL */ - lmap->binddn = NULL; -- lmap->passwd = NULL; -+ -+ lmap->secret = NULL; - lmap->base = NULL; - lmap->ldaphost = NULL; - -@@ -3088,7 +3145,9 @@ - break; - - case 's': /* search scope */ -- if (strncasecmp(++p, "base", 4) == 0) -+ while (isascii(*++p) && isspace(*p)) -+ continue; -+ if (strncasecmp(p, "base", 4) == 0) - { - lmap->scope = LDAP_SCOPE_BASE; - } -@@ -3142,7 +3201,36 @@ - lmap->timelimit = atoi(p); - lmap->timeout.tv_sec = lmap->timelimit; - break; -- -+ case 'D': /* Dn to bind to server as */ -+ while (isascii(*++p) && isspace(*p)) -+ continue; -+ lmap->binddn = p; -+ break; -+ case 'M': /* Method for binding */ -+ while (isascii(*++p) && isspace(*p)) -+ continue; -+ /* Need to map ascii method to int here */ -+ tmp = p ; -+ /* Argh, can't use ldap_map_dequote here */ -+ if ( *tmp == '"' ) { -+ while ( isascii(*++tmp) && isspace(*tmp)) -+ continue; -+ } -+ for(i = 0 ; i < LDAP_MAP_AUTH_METHOD_MAX ; i++ ) { -+ if ( strncmp(tmp,ldap_map_auth_methods[i],strlen(ldap_map_auth_methods[i])) == 0 ) { -+ lmap->method = ldap_map_auth_methods_code[i] ; -+ } -+ } -+ -+ break ; -+ /* This is a string that is dependent on the -+ * method used defined above. -+ */ -+ case 'S': /* Secret for binding */ -+ while (isascii(*++p) && isspace(*p)) -+ continue; -+ lmap->secret = p ; -+ break ; - } - - /* need to account for quoted strings here arggg... */ -@@ -3189,16 +3277,60 @@ - return FALSE; - } - -- if (lmap->binddn != NULL) -- lmap->binddn = newstr(ldap_map_dequote(lmap->binddn)); -+ if (lmap->binddn != NULL) { -+ lmap->binddn = newstr(ldap_map_dequote(lmap->binddn)); -+ -+ if ( lmap->secret != NULL ) { -+ /* need to use method to map secret to passwd string */ -+ switch(lmap->method) -+ { -+ -+ case LDAP_AUTH_NONE: /* Do nothing */ -+ break; -+ case LDAP_AUTH_SIMPLE: /* Secret is the name of a file with -+ the first line as the pwd. */ -+ -+ -+ sfd = safefopen(ldap_map_dequote(lmap->secret),O_RDONLY,0,sff); -+ if ( sfd == NULL ) -+ { -+ syserr("LDAP map: cannot open secret %s",ldap_map_dequote(lmap->secret)); -+ return FALSE ; -+ } else -+ { -+ lmap->secret = sfgets(m_tmp,LDAP_MAP_MAX_PASSWD,sfd,0,"ldap_map_parseargs") ; -+ fclose(sfd) ; -+ if ( lmap->secret != NULL ) -+ { -+ /* chomp newline */ -+ if (m_tmp[strlen(m_tmp)-1] == '\n') -+ m_tmp[strlen(m_tmp)-1] = '\0'; -+ -+ lmap->secret = newstr(m_tmp) ; -+ } -+ } -+ break ; -+ case LDAP_AUTH_KRBV4: /* Secret is where the tgt file -+ is stashed */ -+ /* We could be paranoid here.. */ -+ snprintf(m_tmp,MAXPATHLEN+LDAP_MAP_MAX_PASSWD,"KRBTKFILE=%s",ldap_map_dequote(lmap->secret)); -+ putenv(m_tmp); -+ lmap->secret = NULL ; -+ break ; -+ default : /* Should NEVER get here */ -+ syserr("LDAP map: Garbage in lmap method" ) ; -+ return FALSE ; -+ break ; -+ } /* end switch */ -+ } -+ } - else - lmap->binddn = DEFAULT_LDAP_MAP_BINDDN; -- - -- if (lmap->passwd != NULL) -- lmap->passwd = newstr(ldap_map_dequote(lmap->passwd)); -+ if (lmap->secret != NULL) -+ lmap->secret = newstr(ldap_map_dequote(lmap->secret)); - else -- lmap->passwd = DEFAULT_LDAP_MAP_PASSWD; -+ lmap->secret = DEFAULT_LDAP_MAP_SECRET; - - if (lmap->base != NULL) - lmap->base = newstr(ldap_map_dequote(lmap->base)); diff --git a/debian/patches/patch.local_procmail b/debian/patches/patch.local_procmail deleted file mode 100644 index df6ea83..0000000 --- a/debian/patches/patch.local_procmail +++ /dev/null @@ -1,68 +0,0 @@ -# Make sure FEATURE(local_procmail) comes before MAILER(local) -# -# To apply this patch: -# STEP 1: Chdir to the source directory. -# STEP 2: Run the 'applypatch' program with this patch file as input. -# -# If you do not have 'applypatch', it is part of the 'makepatch' package -# that you can fetch from the Comprehensive Perl Archive Network: -# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz -# In the above URL, 'x' should be 2 or higher. -# -# To apply this patch without the use of 'applypatch': -# STEP 1: Chdir to the source directory. -# STEP 2: Run the 'patch' program with this file as input. -# -#### End of Preamble #### - -#### Patch data follows #### -diff -c '../../cf/feature/local_procmail.m4' 'local_procmail.m4' -Index: ./../../cf/feature/local_procmail.m4 -*** ./../../cf/feature/local_procmail.m4 Mon Jul 19 15:45:59 1999 ---- ./local_procmail.m4 Mon Jul 19 15:46:56 1999 -*************** -*** 12,20 **** - # - - divert(0) -! VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/1998') - divert(-1) - - define(`LOCAL_MAILER_PATH', - ifelse(_ARG_, `', - ifdef(`PROCMAIL_MAILER_PATH', ---- 12,22 ---- - # - - divert(0) -! VERSIONID(`@(#)local_procmail.m4 8.13 (Debian) 7/19/1999') - divert(-1) - -+ ifdef(`_MAILER_local_', -+ `errprint(`*** FEATURE(local_procmail) must occur before MAILER(local)')')dnl - define(`LOCAL_MAILER_PATH', - ifelse(_ARG_, `', - ifdef(`PROCMAIL_MAILER_PATH', -*************** -*** 22,25 **** - `/usr/local/bin/procmail'), - _ARG_)) - define(`LOCAL_MAILER_FLAGS', `SPfhn9') -! define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u') ---- 24,27 ---- - `/usr/local/bin/procmail'), - _ARG_)) - define(`LOCAL_MAILER_FLAGS', `SPfhn9') -! define(`LOCAL_MAILER_ARGS', `procmail -a $h -d $u') -#### End of Patch data #### - -#### ApplyPatch data follows #### -# Data version : 1.0 -# Date generated : Mon Jul 19 15:59:28 1999 -# Generated by : makepatch 2.00 -# Recurse directories : Yes -# p '../../cf/feature/local_procmail.m4' 715 -#### End of ApplyPatch data #### - -#### End of Patch kit [created: Mon Jul 19 15:59:28 1999] #### -#### Checksum: 68 2121 26700 #### diff --git a/debian/patches/patch.mail.local b/debian/patches/patch.mail.local deleted file mode 100644 index d0c8b0d..0000000 --- a/debian/patches/patch.mail.local +++ /dev/null @@ -1,68 +0,0 @@ -diff -wur ./mail.local/mail.local.c ./debian/patches/mail.local/mail.local.c ---- ./mail.local/mail.local.c Tue Dec 29 18:42:53 1998 -+++ ./debian/patches/mail.local/mail.local.c Sun May 7 17:30:14 2000 -@@ -593,6 +593,7 @@ - FILE *fp = NULL; - time_t tval; - int fd, eline; -+ int prevfl, fl = 1; - char line[2048]; - char tmpbuf[sizeof _PATH_LOCTMP + 1]; - -@@ -620,12 +621,13 @@ - for (eline = 1; fgets(line, sizeof(line), stdin);) { - size_t line_len = strlen(line); - -+ prevfl=fl; - if (line_len >= 2 && - line[line_len - 2] == '\r' && - line[line_len - 1] == '\n') { - strcpy(line + line_len - 2, "\n"); - } -- if (lmtprcpts && line[0] == '.') { -+ if (prevfl && lmtprcpts && line[0] == '.') { - char *src = line + 1, *dest = line; - - if (line[1] == '\n') -@@ -634,7 +636,39 @@ - *dest++ = *src++; - *dest = '\0'; - } -- if (line[0] == '\n') -+ -+ fl=0; -+ if (line_len > 0) -+ { -+ if (line[line_len - 1] == '\n') -+ { -+ if (line_len >= 2 && -+ line[line_len - 2] == '\r') -+ { -+ line[line_len - 2] = '\n'; -+ line[line_len - 1] = '\0'; -+ line_len--; -+ } -+ fl = 1; -+ } -+ else if (line[line_len - 1] == '\r') -+ { -+ int peek; -+ /* Did we just miss the CRLF? */ -+ peek = fgetc(stdin); -+ if (peek == '\n') -+ { -+ line[line_len - 1] = '\n'; -+ fl = 1; -+ } -+ else -+ (void) ungetc(peek, stdin); -+ } -+ } -+ else -+ fl = 1; -+ -+ if (prevfl && line[0] == '\n') - eline = 1; - else { - if (eline && line[0] == 'F' && - diff --git a/debian/patches/patches.index b/debian/patches/patches.index new file mode 100644 index 0000000..7b45ffb --- /dev/null +++ b/debian/patches/patches.index @@ -0,0 +1,16 @@ +The following Debian specific patches have been applied: + + *) dpatch.001 cf/feature/local_procmail.m4 + Remove -Y from procmail arguements + + *) dpatch.002 cf/mailer/cyrus.m4 + Support cyrus-deliver MDA (Thanks Manoj Srivastava) + + *) dpatch.003 rmail/rmail.c + Change sendmail call -obq to -obi + + *) dpatch.004 sendmail/control.c + Make control socket mode 0660 + + *) dpatch.005 cf/mailer/fax.m4 + /usr/bin/faxmail, !/usr/local/bin/faxmail diff --git a/debian/patches/prescan.8.9.3.patch b/debian/patches/prescan.8.9.3.patch deleted file mode 100644 index 03bb80c..0000000 --- a/debian/patches/prescan.8.9.3.patch +++ /dev/null @@ -1,122 +0,0 @@ -Index: conf.c -=================================================================== -RCS file: /cvs/sendmail/conf.c,v -retrieving revision 8.456 -retrieving revision 8.456.2.2 -diff -c -r8.456 -r8.456.2.2 -*** sendmail-8.9.3/src/conf.c 7 Feb 1999 07:26:35 -0000 8.456 ---- conf.c 28 Mar 2003 06:03:22 -0000 8.456.2.2 -*************** -*** 286,291 **** ---- 286,293 ---- - DontLockReadFiles = TRUE; - DoubleBounceAddr = "postmaster"; - MaxHeadersLength = MAXHDRSLEN; -+ MaxMimeHeaderLength = MAXLINE; -+ MaxMimeFieldLength = MaxMimeHeaderLength / 2; - snprintf(buf, sizeof buf, "%s%sdead.letter", - _PATH_VARTMP, - _PATH_VARTMP[sizeof _PATH_VARTMP - 2] == '/' ? "" : "/"); -Index: parseaddr.c -=================================================================== -RCS file: /cvs/sendmail/parseaddr.c,v -retrieving revision 8.159 -retrieving revision 8.159.2.3 -diff -c -r8.159 -r8.159.2.3 -*** sendmail-8.9.3/src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159 ---- parseaddr.c 27 Mar 2003 19:42:23 -0000 8.159.2.3 -*************** -*** 403,409 **** - }; - - -! # define NOCHAR -1 /* signal nothing in lookahead token */ - - char ** - prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) ---- 403,409 ---- - }; - - -! # define NOCHAR (-1) /* signal nothing in lookahead token */ - - char ** - prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) -*************** -*** 486,491 **** ---- 486,492 ---- - /* see if there is room */ - if (q >= &pvpbuf[pvpbsize - 5]) - { -+ addrtoolong: - usrerr("553 Address too long"); - if (strlen(addr) > (SIZE_T) MAXNAME) - addr[MAXNAME] = '\0'; -*************** -*** 497,507 **** - } - - /* squirrel it away */ - *q++ = c; - } - - /* read a new input character */ -! c = *p++; - if (c == '\0') - { - /* diagnose and patch up bad syntax */ ---- 498,512 ---- - } - - /* squirrel it away */ -+ #if !ALLOW_255 -+ if ((char) c == (char) -1 && !tTd(82, 101)) -+ c &= 0x7f; -+ #endif /* !ALLOW_255 */ - *q++ = c; - } - - /* read a new input character */ -! c = (*p++) & 0x00ff; - if (c == '\0') - { - /* diagnose and patch up bad syntax */ -*************** -*** 556,561 **** ---- 561,569 ---- - } - else if (c != '!' || state == QST) - { -+ /* see if there is room */ -+ if (q >= &pvpbuf[pvpbsize - 5]) -+ goto addrtoolong; - *q++ = '\\'; - continue; - } -*************** -*** 637,642 **** ---- 645,653 ---- - /* new token */ - if (tok != q) - { -+ /* see if there is room */ -+ if (q >= &pvpbuf[pvpbsize - 5]) -+ goto addrtoolong; - *q++ = '\0'; - if (tTd(22, 36)) - { -Index: version.c -=================================================================== -*** sendmail-8.9.3/src/version.c Thu Feb 4 16:38:46 1999 ---- version.c Wed Mar 19 16:33:35 2003 -*************** -*** 14,17 **** - static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999"; - #endif /* not lint */ - -! char Version[] = "8.9.3"; ---- 14,17 ---- - static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999"; - #endif /* not lint */ - -! char Version[] = "8.9.3p2"; diff --git a/debian/patches/proto.m4.8.9.3 b/debian/patches/proto.m4.8.9.3 deleted file mode 100644 index fec4494..0000000 --- a/debian/patches/proto.m4.8.9.3 +++ /dev/null @@ -1,13 +0,0 @@ -*** ./sendmail-8.9.3/cf/m4/proto.m4 Tue Feb 2 15:21:30 1999 ---- proto.m4.n Tue Dec 3 15:32:38 2002 -*************** -*** 1100,1105 **** ---- 1100,1107 ---- - - ifdef(`ACCESS_TABLE', `dnl - R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 > -+ # empty client_name -+ R $| $+ $: $>LookUpAddress < $1 > <?> < $1 > - R<?> < $+ > $: $>LookUpAddress < $1 > <?> < $1 > - R<?> < $+ > $: $1 - R<OK> < $* > $@ OK diff --git a/debian/patches/src.conf.h.linux b/debian/patches/src.conf.h.linux deleted file mode 100644 index 745cbce..0000000 --- a/debian/patches/src.conf.h.linux +++ /dev/null @@ -1,54 +0,0 @@ -diff -c './src/conf.h' 'conf.h' -Index: ./src/conf.h -Prereq: 8.385 -*** sendmail-8.9.3/src/conf.h Wed Jul 25 12:23:19 2001 ---- ./src/conf.h Tue Jul 31 16:33:50 2001 -*************** -*** 1274,1280 **** - - #ifdef __linux__ - # define BSD 1 /* include BSD defines */ -! # define USESETEUID 0 /* Have it due to POSIX, but doesn't work */ - # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ - # define HASUNAME 1 /* use System V uname(2) system call */ - # define HASUNSETENV 1 /* has unsetenv(3) call */ ---- 1274,1280 ---- - - #ifdef __linux__ - # define BSD 1 /* include BSD defines */ -! # define USESETEUID 1 /* Have it due to POSIX, but doesn't work */ - # define NEEDGETOPT 1 /* need a replacement for getopt(3) */ - # define HASUNAME 1 /* use System V uname(2) system call */ - # define HASUNSETENV 1 /* has unsetenv(3) call */ -*************** -*** 1283,1289 **** - # endif - # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ - # define GIDSET_T gid_t /* from <linux/types.h> */ -! # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */ - # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ - # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ - # ifndef HASFLOCK ---- 1283,1289 ---- - # endif - # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ - # define GIDSET_T gid_t /* from <linux/types.h> */ -! # define HASGETUSERSHELL 1 /* getusershell(3) broken in Slackware 2.0 */ - # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */ - # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ - # ifndef HASFLOCK -*************** -*** 1307,1312 **** ---- 1307,1318 ---- - # endif - # include <sys/sysmacros.h> - # undef atol /* wounded in <stdlib.h> */ -+ # if !defined(KERNEL_VERSION) /* not defined in 2.0.x kernel series */ -+ # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -+ # endif /* !defined(KERNEL_VERSION) */ -+ # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) -+ # define HASFCHMOD 1 /* fchmod(2) */ -+ # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) */ - #endif - - diff --git a/debian/patches/util.c.893.patch b/debian/patches/util.c.893.patch deleted file mode 100644 index fb71fcd..0000000 --- a/debian/patches/util.c.893.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- ./src/util.c.orig Fri Jan 22 07:18:40 1999 -+++ sendmail-8.9.3/src/util.c Thu Apr 29 02:34:21 1999 -@@ -2086,6 +2086,8 @@ - ProcListVec = npv; - } - ProcListVec[i].proc_pid = pid; -+ if (ProcListVec[i].proc_task != NULL) -+ free(ProcListVec[i].proc_task); - ProcListVec[i].proc_task = newstr(task); - - /* if process adding itself, it's not a child */ -@@ -2142,11 +2144,6 @@ - if (ProcListVec[i].proc_pid == pid) - { - ProcListVec[i].proc_pid = NO_PID; -- if (ProcListVec[i].proc_task != NULL) -- { -- free(ProcListVec[i].proc_task); -- ProcListVec[i].proc_task = NULL; -- } - break; - } - } -@@ -2172,11 +2169,6 @@ - for (i = 1; i < ProcListSize; i++) - { - ProcListVec[i].proc_pid = NO_PID; -- if (ProcListVec[i].proc_task != NULL) -- { -- free(ProcListVec[i].proc_task); -- ProcListVec[i].proc_task = NULL; -- } - } - CurChildren = 0; - } -@@ -2207,11 +2199,6 @@ - "proc_list_probe: lost pid %d", - (int) ProcListVec[i].proc_pid); - ProcListVec[i].proc_pid = NO_PID; -- if (ProcListVec[i].proc_task != NULL) -- { -- free(ProcListVec[i].proc_task); -- ProcListVec[i].proc_task = NULL; -- } - CurChildren--; - } - } - |