aboutsummaryrefslogtreecommitdiff
path: root/mail/sendmail812
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2002-02-27 04:53:07 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2002-02-27 04:53:07 +0000
commit5f11dc60c5a39ce0e54cb77bbeb135ec4f2d235d (patch)
treeb9548693109e03f33a62aa410244d09361d2fa83 /mail/sendmail812
parent617b70976e1f9826109435dbf4557c524c666140 (diff)
downloadports-5f11dc60c5a39ce0e54cb77bbeb135ec4f2d235d.tar.gz
ports-5f11dc60c5a39ce0e54cb77bbeb135ec4f2d235d.zip
Notes
Diffstat (limited to 'mail/sendmail812')
-rw-r--r--mail/sendmail812/Makefile2
-rw-r--r--mail/sendmail812/files/patch-sendmail-deliver.c64
-rw-r--r--mail/sendmail812/files/patch-sendmail-milter.c39
3 files changed, 104 insertions, 1 deletions
diff --git a/mail/sendmail812/Makefile b/mail/sendmail812/Makefile
index 7621846fa8cd..27554dbd082e 100644
--- a/mail/sendmail812/Makefile
+++ b/mail/sendmail812/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sendmail
PORTVERSION= 8.12.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/mail/sendmail/&,}
diff --git a/mail/sendmail812/files/patch-sendmail-deliver.c b/mail/sendmail812/files/patch-sendmail-deliver.c
new file mode 100644
index 000000000000..a6c81e12774c
--- /dev/null
+++ b/mail/sendmail812/files/patch-sendmail-deliver.c
@@ -0,0 +1,64 @@
+diff -u -r8.928 deliver.c
+--- sendmail/deliver.c 2002/01/10 03:23:29 8.928
++++ sendmail/deliver.c 2002/02/04 23:32:05
+@@ -5141,11 +5141,17 @@
+ }
+ (void) sm_strlcpy(targetfile, SafeFileEnv, sizeof targetfile);
+ realfile = targetfile + len;
+- if (targetfile[len - 1] != '/')
+- (void) sm_strlcat(targetfile, "/", sizeof targetfile);
+ if (*filename == '/')
+ filename++;
+- (void) sm_strlcat(targetfile, filename, sizeof targetfile);
++ if (*filename != '\0')
++ {
++ /* paranoia: trailing / should be removed in readcf */
++ if (targetfile[len - 1] != '/')
++ (void) sm_strlcat(targetfile,
++ "/", sizeof targetfile);
++ (void) sm_strlcat(targetfile, filename,
++ sizeof targetfile);
++ }
+ }
+ else if (mailer->m_rootdir != NULL)
+ {
+@@ -5388,6 +5394,9 @@
+
+ if (realfile != targetfile)
+ {
++ char save;
++
++ save = *realfile;
+ *realfile = '\0';
+ if (tTd(11, 20))
+ sm_dprintf("mailfile: chroot %s\n", targetfile);
+@@ -5397,7 +5406,7 @@
+ targetfile);
+ RETURN(EX_CANTCREAT);
+ }
+- *realfile = '/';
++ *realfile = save;
+ }
+
+ if (tTd(11, 40))
+--- sendmail/readcf.c 2002/01/30 19:56:37 8.595
++++ sendmail/readcf.c 2002/02/04 23:32:05
+@@ -2950,6 +2950,17 @@
+ break;
+
+ case O_SAFEFILEENV: /* chroot() environ for writing to files */
++ if (*val == '\0')
++ break;
++
++ /* strip trailing slashes */
++ p = val + strlen(val) - 1;
++ while (p >= val && *p == '/')
++ *p-- = '\0';
++
++ if (*val == '\0')
++ break;
++
+ SafeFileEnv = newstr(val);
+ break;
+
+
diff --git a/mail/sendmail812/files/patch-sendmail-milter.c b/mail/sendmail812/files/patch-sendmail-milter.c
new file mode 100644
index 000000000000..3c56506b00c1
--- /dev/null
+++ b/mail/sendmail812/files/patch-sendmail-milter.c
@@ -0,0 +1,39 @@
+Sendmail 8.12.x
+
+The MTA may erroneously detect a communication failure with libmilter
+(EINTR in select(2)). [ http://www.sendmail.org/~ca/email/sm-812.html ]
+
+Index: milter.c
+===================================================================
+RCS file: /cvs/sendmail/milter.c,v
+retrieving revision 8.187
+retrieving revision 8.188
+diff -u -r8.187 -r8.188
+--- sendmail/milter.c 2002/01/19 00:48:57 8.187
++++ sendmail/milter.c 2002/01/21 04:07:02 8.188
+@@ -139,14 +139,17 @@
+ return NULL; \
+ } \
+ \
+- FD_ZERO(&fds); \
+- SM_FD_SET(m->mf_sock, &fds); \
+- tv.tv_sec = (secs); \
+- tv.tv_usec = 0; \
+- ret = select(m->mf_sock + 1, \
+- (write) ? NULL : &fds, \
+- (write) ? &fds : NULL, \
+- NULL, &tv); \
++ do \
++ { \
++ FD_ZERO(&fds); \
++ SM_FD_SET(m->mf_sock, &fds); \
++ tv.tv_sec = (secs); \
++ tv.tv_usec = 0; \
++ ret = select(m->mf_sock + 1, \
++ (write) ? NULL : &fds, \
++ (write) ? &fds : NULL, \
++ NULL, &tv); \
++ } while (ret < 0 && errno == EINTR); \
+ \
+ switch (ret) \
+ { \