Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Nov 2017 08:04:35 +0000 (UTC)
From:      Lars Engels <lme@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r454812 - in branches/2017Q4/mail/ssmtp: . files
Message-ID:  <201711240804.vAO84ZlC087981@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lme
Date: Fri Nov 24 08:04:35 2017
New Revision: 454812
URL: https://svnweb.freebsd.org/changeset/ports/454812

Log:
  MFH: r454801
  
  mail/ssmtp:
  
  - Add a patch to allow passwords containing = and # characters
  - Bump PORTREVISION
  
  PR:		207117
  Submitted by:	Sergey Manucharian <sm@ara-ler.com>
  Approved by:	maintainer timeout (21 months)
  
  Approved by:	ports-secteam (junovich)

Modified:
  branches/2017Q4/mail/ssmtp/Makefile
  branches/2017Q4/mail/ssmtp/files/patch-ssmtp.c
Directory Properties:
  branches/2017Q4/   (props changed)

Modified: branches/2017Q4/mail/ssmtp/Makefile
==============================================================================
--- branches/2017Q4/mail/ssmtp/Makefile	Fri Nov 24 06:56:07 2017	(r454811)
+++ branches/2017Q4/mail/ssmtp/Makefile	Fri Nov 24 08:04:35 2017	(r454812)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ssmtp
 PORTVERSION=	2.64
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail ipv6
 MASTER_SITES=	DEBIAN_POOL
 DISTFILES=	${PORTNAME}_${PORTVERSION}.orig${EXTRACT_SUFX}

Modified: branches/2017Q4/mail/ssmtp/files/patch-ssmtp.c
==============================================================================
--- branches/2017Q4/mail/ssmtp/files/patch-ssmtp.c	Fri Nov 24 06:56:07 2017	(r454811)
+++ branches/2017Q4/mail/ssmtp/files/patch-ssmtp.c	Fri Nov 24 08:04:35 2017	(r454812)
@@ -1,5 +1,5 @@
---- ssmtp.c.orig	2009-11-23 11:55:11.000000000 +0200
-+++ ssmtp.c	2011-02-21 02:56:10.000000000 +0200
+--- ssmtp.c.orig    2009-11-23 11:55:11.000000000 +0200
++++ ssmtp.c 2011-02-21 02:56:10.000000000 +0200
 @@ -25,6 +25,7 @@
  #include <string.h>
  #include <ctype.h>
@@ -120,7 +120,7 @@
  			}
  
  			/* Ignore malformed lines and comments */
-@@ -519,11 +543,11 @@
+@@ -519,11 +538,11 @@
  #endif
  
  	/* Ignore missing usernames */
@@ -134,7 +134,7 @@
  		die("rcpt_save() -- strdup() failed");
  	}
  
-@@ -548,7 +572,7 @@
+@@ -548,7 +567,7 @@
  	(void)fprintf(stderr, "*** rcpt_parse(): str = [%s]\n", str);
  #endif
  
@@ -143,7 +143,7 @@
  		die("rcpt_parse(): strdup() failed");
  	}
  	q = p;
-@@ -576,7 +600,7 @@
+@@ -576,7 +595,7 @@
  		}
  
  		/* End of string? */
@@ -152,7 +152,7 @@
  			got_addr = True;
  		}
  
-@@ -584,7 +608,7 @@
+@@ -584,7 +603,7 @@
  		if((*q == ',') && (in_quotes == False)) {
  			got_addr = True;
  
@@ -161,7 +161,7 @@
  		}
  
  		if(got_addr) {
-@@ -668,7 +692,7 @@
+@@ -668,7 +687,7 @@
  	(void)fprintf(stderr, "header_save(): str = [%s]\n", str);
  #endif
  
@@ -170,7 +170,7 @@
  		die("header_save() -- strdup() failed");
  	}
  	ht->string = p;
-@@ -676,7 +700,7 @@
+@@ -676,7 +695,7 @@
  	if(strncasecmp(ht->string, "From:", 5) == 0) {
  #if 1
  		/* Hack check for NULL From: line */
@@ -179,7 +179,7 @@
  			return;
  		}
  #endif
-@@ -739,19 +763,19 @@
+@@ -739,19 +758,19 @@
  void header_parse(FILE *stream)
  {
  	size_t size = BUF_SZ, len = 0;
@@ -203,7 +203,7 @@
  				die("header_parse() -- realloc() failed");
  			}
  			q = (p + len);
-@@ -776,9 +800,9 @@
+@@ -776,9 +795,9 @@
  						in_header = False;
  
  				default:
@@ -215,7 +215,7 @@
  						}
  						header_save(p);
  
-@@ -809,9 +833,9 @@
+@@ -809,9 +828,9 @@
  						in_header = False;
  
  				default:
@@ -227,12 +227,18 @@
  						}
  						header_save(p);
  
-@@ -876,11 +900,11 @@
+@@ -876,21 +895,27 @@
  		char *rightside;
  		/* Make comments invisible */
  		if((p = strchr(buf, '#'))) {
 -			*p = (char)NULL;
-+			*p = '\0';
++			/* check if # is a part of a param */
++			if((q = strchr(buf, '='))) { 
++				if ((int)(p-buf) < (int)(q-buf))
++					*p = '\0';
++			}
++			else
++				*p = '\0';
  		}
  
  		/* Ignore malformed lines and comments */
@@ -241,7 +247,10 @@
  
  		/* Parse out keywords */
  		p=firsttok(&begin, "= \t\n");
-@@ -890,7 +914,7 @@
+ 		if(p){
+ 			rightside=begin;
+-			q = firsttok(&begin, "= \t\n");
++			q = firsttok(&begin, " \t\n");
  		}
  		if(p && q) {
  			if(strcasecmp(p, "Root") == 0) {
@@ -250,7 +259,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -904,7 +928,7 @@
+@@ -904,7 +929,7 @@
  					port = atoi(r);
  				}
  
@@ -259,7 +268,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -949,7 +973,7 @@
+@@ -949,7 +974,7 @@
  					mail_domain = strdup(q);
  				}
  
@@ -268,7 +277,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  				rewrite_domain = True;
-@@ -1025,7 +1049,7 @@
+@@ -1025,7 +1050,7 @@
  				}
  			}
  			else if(strcasecmp(p, "TLSCert") == 0) {
@@ -277,7 +286,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -1036,7 +1060,7 @@
+@@ -1036,7 +1061,7 @@
  #endif
  			/* Command-line overrides these */
  			else if(strcasecmp(p, "AuthUser") == 0 && !auth_user) {
@@ -286,7 +295,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -1045,7 +1069,7 @@
+@@ -1045,7 +1070,7 @@
  				}
  			}
  			else if(strcasecmp(p, "AuthPass") == 0 && !auth_pass) {
@@ -295,7 +304,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -1054,7 +1078,7 @@
+@@ -1054,7 +1079,7 @@
  				}
  			}
  			else if(strcasecmp(p, "AuthMethod") == 0 && !auth_method) {
@@ -304,7 +313,7 @@
  					die("parse_config() -- strdup() failed");
  				}
  
-@@ -1107,11 +1131,11 @@
+@@ -1107,11 +1132,11 @@
  #ifdef INET6
  	struct addrinfo hints, *ai0, *ai;
  	char servname[NI_MAXSERV];
@@ -318,7 +327,7 @@
  #endif
  
  #ifdef HAVE_SSL
-@@ -1310,7 +1334,7 @@
+@@ -1310,7 +1335,7 @@
  			buf[i++] = c;
  		}
  	}
@@ -327,7 +336,7 @@
  
  	return(buf);
  }
-@@ -1434,14 +1458,14 @@
+@@ -1435,14 +1460,14 @@
  	}
  
  	if((p = strtok(pw->pw_gecos, ";,"))) {
@@ -344,7 +353,7 @@
  		uad = append_domain(pw->pw_name);
  	}
  
-@@ -1489,7 +1513,7 @@
+@@ -1490,7 +1515,7 @@
  	/* Try to log in if username was supplied */
  	if(auth_user) {
  #ifdef MD5AUTH
@@ -353,7 +362,7 @@
  			auth_pass = strdup("");
  		}
  
-@@ -1737,7 +1761,7 @@
+@@ -1742,7 +1767,7 @@
  		j = 0;
  
  		add = 1;
@@ -362,7 +371,7 @@
  			switch(argv[i][j]) {
  #ifdef INET6
  			case '6':
-@@ -1755,14 +1779,14 @@
+@@ -1760,14 +1785,14 @@
  					if((!argv[i][(j + 1)])
  						&& argv[(i + 1)]) {
  						auth_user = strdup(argv[i+1]);
@@ -379,7 +388,7 @@
  							die("parse_options() -- strdup() failed");
  						}
  					}
-@@ -1772,14 +1796,14 @@
+@@ -1777,14 +1802,14 @@
  					if((!argv[i][(j + 1)])
  						&& argv[(i + 1)]) {
  						auth_pass = strdup(argv[i+1]);
@@ -396,7 +405,7 @@
  							die("parse_options() -- strdup() failed");
  						}
  					}
-@@ -1870,14 +1894,14 @@
+@@ -1875,14 +1900,14 @@
  			case 'F':
  				if((!argv[i][(j + 1)]) && argv[(i + 1)]) {
  					minus_F = strdup(argv[(i + 1)]);
@@ -413,7 +422,7 @@
  						die("parse_options() -- strdup() failed");
  					}
  				}
-@@ -1889,14 +1913,14 @@
+@@ -1894,14 +1919,14 @@
  			case 'r':
  				if((!argv[i][(j + 1)]) && argv[(i + 1)]) {
  					minus_f = strdup(argv[(i + 1)]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711240804.vAO84ZlC087981>