From philk@rotfl.com.au  Mon Aug 22 12:46:50 2005
Return-Path: <philk@rotfl.com.au>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2D80F16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Aug 2005 12:46:50 +0000 (GMT)
	(envelope-from philk@rotfl.com.au)
Received: from mail.rotfl.com.au (eth1779.sa.adsl.internode.on.net [150.101.235.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A0CAB43D45
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Aug 2005 12:46:49 +0000 (GMT)
	(envelope-from philk@rotfl.com.au)
Received: from localhost (localhost.rotfl.com.au [127.0.0.1])
	by mail.rotfl.com.au (Postfix) with ESMTP id ED40945400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 22 Aug 2005 22:16:47 +0930 (CST)
Received: from mail.rotfl.com.au ([127.0.0.1])
 by localhost (mail.rotfl.com.au [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id 18798-04 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 22 Aug 2005 22:16:39 +0930 (CST)
Message-Id: <20050822124639.3C3F845401@mail.rotfl.com.au>
Date: Mon, 22 Aug 2005 22:16:39 +0930 (CST)
From: Phil Kernick <philk@rotfl.com.au>
Reply-To: Phil Kernick <philk@rotfl.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Updated port of www/squirm to fix critical errors
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         85215
>Category:       ports
>Synopsis:       Updated port of www/squirm to fix critical errors
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 22 12:50:16 GMT 2005
>Closed-Date:    Thu Sep 01 15:16:43 GMT 2005
>Last-Modified:  Thu Sep 01 15:16:43 GMT 2005
>Originator:     Phil Kernick
>Release:        FreeBSD 5.4-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD catbert.rotfl.com.au 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Mon Aug 15 13:12:48 CST 2005 root@catbert.rotfl.com.au:/usr/src/sys/i386/compile/CATBERT i386


	
>Description:

The www/squirm port has numerous errors that have only shown on FreeBSD5.
These include multiple double-free memory errors, errors with handling the
return from strdup() and the use of the gnuregex library.

These errors cause the installed binary to core dump on access.

Previously submitted PR from me fix some of these errors with a patch, but I
have been in communication with the developer, and a completely fixed
release has been tested.

None of the bugs in the current version of the port are present in the new
version.

>How-To-Repeat:

Install port www/squirm and watch /var/log/messages fill up with errors like
this:

Aug 22 18:31:58 catbert kernel: pid 41795 (squirm), uid 81: exited on signal 11 (core dumped)

>Fix:

Replace the port for www/squirm with the one from here:
http://www.rotfl.com.au/philk/squirm.tgz

This updates squirm to v1.26 and fixes all known bugs.



>Release-Note:
>Audit-Trail:

From: Sergey Matveychuk <sem@FreeBSD.org>
To: bug-followup@FreeBSD.org,  philk@rotfl.com.au
Cc:  
Subject: Re: ports/85215: Updated port of www/squirm to fix critical errors
Date: Tue, 23 Aug 2005 20:23:16 +0400

 A canonical way for ports updates is unify diff.
 
 --
 Sem.

From: Chris Larsen <darth@vader.dk>
To: bug-followup@FreeBSD.org, philk@rotfl.com.au
Cc:  
Subject: Re: ports/85215: Updated port of www/squirm to fix critical errors
Date: Tue, 30 Aug 2005 22:06:42 +0200

 --ZInfyf7laFu/Kiw7
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 - Update www/squirm from 1.23 to 1.26
 - Fix patch files to match new source
 - Change logic in Makefile to use the SQUID_UID and SQUID_GID defaults
   that the squid port uses, remove the need to specify the uid/gid,
   but inform the user that the defaults are used. (remove the
   NO_PACKAGE block)
 
 portlint -C : ok 
 make package, pkg_add, pkg_delete: ok
 
 Tested on : 5.4-RELEASE-p6 i386
 
 Re.
 
 -- 
 Chris Larsen
 
 "Make something idiot proof,
  and someone will invent a better idiot."
 
 --ZInfyf7laFu/Kiw7
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="squirm.patch"
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/www/squirm/Makefile,v
 retrieving revision 1.17
 diff -u -r1.17 Makefile
 --- Makefile	6 Jan 2004 21:55:47 -0000	1.17
 +++ Makefile	30 Aug 2005 19:44:45 -0000
 @@ -6,8 +6,7 @@
  #
  
  PORTNAME=	squirm
 -PORTVERSION=	1.23
 -PORTREVISION=	2
 +PORTVERSION=	1.26
  CATEGORIES=	www
  MASTER_SITES=	http://squirm.foote.com.au/
  EXTRACT_SUFX=	.tgz
 @@ -17,30 +16,31 @@
  
  RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid
  
 -NO_PACKAGE=	must set SQUID_UID and SQUID_GID before building
 +SQUID_UID?=	squid
 +SQUID_GID?=	squid
  
  MAKE_ENV+=	SQUID_UID=${SQUID_UID} SQUID_GID=${SQUID_GID}
  
  PLIST_SUB=	SQUID_UID=${SQUID_UID} SQUID_GID=${SQUID_GID}
  
  pre-install:
 -.if defined(SQUID_UID) && defined(SQUID_GID)
  .if (${SQUID_UID} == "nobody") || (${SQUID_GID} == "nogroup")
  	@${ECHO_MSG}
  	@${ECHO_MSG}	'WARNING! You are going to install squirm files with either nobody owner or'
  	@${ECHO_MSG}	'nogroup group, which may be insecure.'
  	@${ECHO_MSG}
  .endif
 -.else
 +post-install:
  	@${ECHO_MSG}
 -	@${ECHO_MSG} 	'You should set SQUID_UID and SQUID_GID variables to your squid effective'
 -	@${ECHO_MSG}	'user/group. For example: SQUID_UID=squid SQUID_GID=squid.'
 +.if (${SQUID_UID} == "squid") && (${SQUID_GID} == "squid")
  	@${ECHO_MSG}
 -	@${FALSE}
 -.endif
 -
 -post-install:
 +	@${ECHO_MSG} 'INFO: Your SQUID_UID and SQUID_GID variables are set to the default'
 +	@${ECHO_MSG} '      squid user/group: SQUID_UID = ${SQUID_UID}  SQUID_GID = ${SQUID_GID}'
 +	@${ECHO_MSG} '      These values are used by the www/squid port. They must match what you have chosen'
 +	@${ECHO_MSG} '      for the www/squid port. If you are using different UID/GID they must match,'
 +	@${ECHO_MSG} '      or else you are asking for problems !'
  	@${ECHO_MSG}
 +.endif
  	@${ECHO_MSG} ' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
  	@${ECHO_MSG} '  You have to manually add "redirect_program ${PREFIX}/bin/squirm"'
  	@${ECHO_MSG} '  into your squid.conf file.'
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/www/squirm/distinfo,v
 retrieving revision 1.3
 diff -u -r1.3 distinfo
 --- distinfo	29 Jan 2004 16:12:31 -0000	1.3
 +++ distinfo	30 Aug 2005 19:07:23 -0000
 @@ -1,2 +1,2 @@
 -MD5 (squirm-1.23.tgz) = aedcaab22ca3ae0c8440bd0ef9d6e75e
 -SIZE (squirm-1.23.tgz) = 43151
 +MD5 (squirm-1.26.tgz) = 54ac1d208620ec1e4419f97315d38848
 +SIZE (squirm-1.26.tgz) = 24151
 Index: files/patch-ab
 ===================================================================
 RCS file: /home/ncvs/ports/www/squirm/files/patch-ab,v
 retrieving revision 1.2
 diff -u -r1.2 patch-ab
 --- files/patch-ab	7 Jun 2000 08:00:47 -0000	1.2
 +++ files/patch-ab	30 Aug 2005 19:27:15 -0000
 @@ -1,6 +1,6 @@
 ---- ../squirm-1.23.orig/paths.h	Fri Mar 31 08:08:43 2000
 -+++ paths.h	Wed Jun  7 10:26:23 2000
 -@@ -17,14 +17,14 @@
 +--- paths.h.org	Tue Aug 30 21:14:48 2005
 ++++ paths.h	Tue Aug 30 21:15:40 2005
 +@@ -37,14 +37,14 @@
   
   /*************  Log File Locations (must be writable by **********/
   /*************  the user given in the squid.conf file   **********/
 @@ -9,13 +9,13 @@
  -#define LOG_ERROR PREFIX"/logs/squirm.error"
  -#define LOG_WHERE PREFIX"/logs/squirm.where"
  -#define LOG_DEBUG PREFIX"/logs/squirm.debug"
 --#define LOG_INFO PREFIX"/logs/squirm.info"
 +-#define LOG_INFO  PREFIX"/logs/squirm.info"
  +#define LOG_MATCH PREFIX"/squirm/logs/squirm.match"
  +#define LOG_FAIL  PREFIX"/squirm/logs/squirm.fail"
  +#define LOG_ERROR PREFIX"/squirm/logs/squirm.error"
  +#define LOG_WHERE PREFIX"/squirm/logs/squirm.where"
  +#define LOG_DEBUG PREFIX"/squirm/logs/squirm.debug"
 -+#define LOG_INFO PREFIX"/squirm/logs/squirm.info"
 ++#define LOG_INFO  PREFIX"/squirm/logs/squirm.info"
   
   /*************  Configuration file locations  ***********/
  -#define SQUIRM_CONF PREFIX"/etc/squirm.conf"
 Index: files/patch-ac
 ===================================================================
 RCS file: /home/ncvs/ports/www/squirm/files/patch-ac,v
 retrieving revision 1.2
 diff -u -r1.2 patch-ac
 --- files/patch-ac	7 Nov 2001 20:26:37 -0000	1.2
 +++ files/patch-ac	30 Aug 2005 19:49:10 -0000
 @@ -1,29 +1,11 @@
 -
 -$FreeBSD: ports/www/squirm/files/patch-ac,v 1.2 2001/11/07 20:26:37 sobomax Exp $
 -
 ---- config.c.orig	Fri Mar 31 08:08:04 2000
 -+++ config.c	Wed Nov  7 22:23:27 2001
 -@@ -277,7 +277,7 @@
 +--- config.c.org	Tue Aug 30 21:19:29 2005
 ++++ config.c	Tue Aug 30 21:21:10 2005
 +@@ -273,7 +273,7 @@
   	    return 0;
   	  }
   
  -	  fq_pattern_filename = gen_fq_name(pattern_filename, "etc/");
  +	  fq_pattern_filename = gen_fq_name(pattern_filename, "etc/squirm/");
   	  if (fq_pattern_filename == NULL) {
 - 	    log(LOG_ERROR, "couldn't allocate memory in parse_squirm_conf()\n");
 + 	    logprint(LOG_ERROR, "couldn't allocate memory in parse_squirm_conf()\n");
   	    dodo_mode = 1;
 -@@ -304,11 +304,11 @@
 - 	    }
 - 	    else if (strncasecmp(tmp1,"post", min(strlen("post"), strlen(tmp1))) == 0) {
 - 	      methods |= POST;
 --	      tmp1 += strlen("get");
 -+	      tmp1 += strlen("post");
 - 	    }
 - 	    else if (strncasecmp(tmp1, "head", min(strlen("head"), strlen(tmp1))) == 0) {
 --	      methods |= GET;
 --	      tmp1 += strlen("get");
 -+	      methods |= HEAD;
 -+	      tmp1 += strlen("head");
 - 	    }
 - 	    else if (strncasecmp(tmp1, "all", min(strlen("all"), strlen(tmp1))) == 0) {
 - 	      methods |= ALL;
 
 --ZInfyf7laFu/Kiw7--
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Thu Sep 1 15:16:36 GMT 2005 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85215 
>Unformatted:
