diff options
author | dinoex <dinoex@FreeBSD.org> | 2002-02-27 04:53:07 +0000 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2002-02-27 04:53:07 +0000 |
commit | acac1e132ad5b2e6997d37daf1b320d2eeae0e6d (patch) | |
tree | 1bd03af23bb28099c64561069afdf026910ebe95 | |
parent | 5df9630082b85543f7cc337a61440bf6da50c42c (diff) | |
download | FreeBSD-ports-acac1e132ad5b2e6997d37daf1b320d2eeae0e6d.zip FreeBSD-ports-acac1e132ad5b2e6997d37daf1b320d2eeae0e6d.tar.gz |
BUMP portrevision
Add patches:
----- MEDIUM -----
mikea@kconline.com:
Sendmail 8.12.x has an implementation bug in the milter
code that causes the milter daemons to fail when they
are bombarded with 20-30 messages from a mail server.
mail sendmail[82323]: g1N53lNY082323: Milter
(milter-amavis): select(read): Interrupted system call
The patch available at the link above definitely fixes the Milter timeout
problem. Before applying the patch, I would see this every 5 to 15 minutes
in our logs.
here hasn't been another one since I applied the patch 5 hours ago.
----- LOW -----
dionex@freebsd.org:
Fix SafeFileEnv, it won't work if configured up with a trailing '/'
-----
PR: 35363
Submitted by: mikea@kconline.com,dinoex
-rw-r--r-- | mail/sendmail/Makefile | 2 | ||||
-rw-r--r-- | mail/sendmail/files/patch-sendmail-deliver.c | 64 | ||||
-rw-r--r-- | mail/sendmail/files/patch-sendmail-milter.c | 39 | ||||
-rw-r--r-- | mail/sendmail812/Makefile | 2 | ||||
-rw-r--r-- | mail/sendmail812/files/patch-sendmail-deliver.c | 64 | ||||
-rw-r--r-- | mail/sendmail812/files/patch-sendmail-milter.c | 39 |
6 files changed, 208 insertions, 2 deletions
diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile index 7621846..27554db 100644 --- a/mail/sendmail/Makefile +++ b/mail/sendmail/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/sendmail/files/patch-sendmail-deliver.c b/mail/sendmail/files/patch-sendmail-deliver.c new file mode 100644 index 0000000..a6c81e1 --- /dev/null +++ b/mail/sendmail/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/sendmail/files/patch-sendmail-milter.c b/mail/sendmail/files/patch-sendmail-milter.c new file mode 100644 index 0000000..3c56506 --- /dev/null +++ b/mail/sendmail/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) \ + { \ diff --git a/mail/sendmail812/Makefile b/mail/sendmail812/Makefile index 7621846..27554db 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 0000000..a6c81e1 --- /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 0000000..3c56506 --- /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) \ + { \ |