From 3d24885060ba0ebf9c127e49d716bcf01e8ae91b Mon Sep 17 00:00:00 2001 From: is Date: Thu, 16 Jun 2005 15:38:18 +0000 Subject: Handle continuation lines. Fixes pkg/30534. --- mail/mini_sendmail/Makefile | 4 +-- mail/mini_sendmail/distinfo | 6 ++-- mail/mini_sendmail/patches/patch-aa | 62 +++++++++++++++++++++++++++++++++++-- mail/mini_sendmail/patches/patch-ad | 4 +-- 4 files changed, 66 insertions(+), 10 deletions(-) (limited to 'mail/mini_sendmail') diff --git a/mail/mini_sendmail/Makefile b/mail/mini_sendmail/Makefile index dc89627d548..43b21ef191d 100644 --- a/mail/mini_sendmail/Makefile +++ b/mail/mini_sendmail/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2003/10/07 08:45:14 is Exp $ +# $NetBSD: Makefile,v 1.9 2005/06/16 15:38:18 is Exp $ # PKGNAME= mini_sendmail-1.3.2 -PKGREVISION= 4 +PKGREVISION= 5 BUILD_DEFS+= USE_INET6 diff --git a/mail/mini_sendmail/distinfo b/mail/mini_sendmail/distinfo index 7d24ecc9106..fee3cf63fbe 100644 --- a/mail/mini_sendmail/distinfo +++ b/mail/mini_sendmail/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.5 2005/02/24 09:59:25 agc Exp $ +$NetBSD: distinfo,v 1.6 2005/06/16 15:38:18 is Exp $ SHA1 (mini_sendmail-1.3.2.tar.gz) = 1e297ae27135f0f83f09c7be8a911ebfd9e2f966 RMD160 (mini_sendmail-1.3.2.tar.gz) = 9b172cde3d190c3db82b467faf1ecae5ede0ee2d Size (mini_sendmail-1.3.2.tar.gz) = 7329 bytes -SHA1 (patch-aa) = 0a58aa3ca8b3afef3ae6a68386b99020829777c9 +SHA1 (patch-aa) = b76b9e3f50cc9f83555b20f284c8d1b158cfac70 SHA1 (patch-ab) = f96d22be2f94445a6f8b249cdd823dcfbd1528de SHA1 (patch-ac) = 3c10e603993c61f2a518ceb9f130460087c69081 -SHA1 (patch-ad) = d7c79697612745f7fa6abc163b610ccad232ff9c +SHA1 (patch-ad) = b66945faf31c0e96d8bb2accb12de8578a1483b3 diff --git a/mail/mini_sendmail/patches/patch-aa b/mail/mini_sendmail/patches/patch-aa index 2b8c4fe5919..22a2287b04f 100644 --- a/mail/mini_sendmail/patches/patch-aa +++ b/mail/mini_sendmail/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.4 2003/10/07 08:45:14 is Exp $ +$NetBSD: patch-aa,v 1.5 2005/06/16 15:38:18 is Exp $ ---- mini_sendmail.c.orig Thu Nov 21 21:27:55 2002 +--- mini_sendmail.c.orig 2002-11-21 20:27:55.000000000 +0000 +++ mini_sendmail.c @@ -129,6 +129,10 @@ main( int argc, char** argv ) timeout = atoi( &(argv[argn][2]) ); @@ -13,7 +13,63 @@ $NetBSD: patch-aa,v 1.4 2003/10/07 08:45:14 is Exp $ else usage(); ++argn; -@@ -575,14 +579,16 @@ open_client_socket( void ) +@@ -490,14 +494,24 @@ parse_for_recipients( char* message ) + switch ( *cp ) + { + case '\n': +- add_recipient( recip, ( cp - recip ) ); +- state = ST_BOL; +- if ( bcc != (char*) 0 ) ++ /* peek ahead for continuation line */ ++ switch (cp[1]) + { +- /* Elide the Bcc: line, and reset cp. */ +- (void) strcpy( bcc, cp + 1 ); +- cp = bcc - 1; +- bcc = (char*) 0; ++ case ' ': ++ case '\t': ++ break; ++ ++ default: ++ add_recipient( recip, ( cp - recip ) ); ++ state = ST_BOL; ++ if ( bcc != (char*) 0 ) ++ { ++ /* Elide the Bcc: line, and reset cp. */ ++ (void) strcpy( bcc, cp + 1 ); ++ cp = bcc - 1; ++ bcc = (char*) 0; ++ } ++ break; + } + break; + case ',': +@@ -516,15 +530,22 @@ add_recipient( char* recipient, int len + { + char buf[1000]; + int status; ++ int i; + + /* Skip leading whitespace. */ +- while ( len > 0 && ( *recipient == ' ' || *recipient == '\t' ) ) ++ while ( len > 0 && ( *recipient == ' ' || *recipient == '\t' || ++ *recipient == '\n') ) + { + ++recipient; + --len; + } + + (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient ); ++ for (i=0; i