From tmseck@netcologne.de  Sat Mar 28 17:17:41 2009
Return-Path: <tmseck@netcologne.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BB5E106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Mar 2009 17:17:41 +0000 (UTC)
	(envelope-from tmseck@netcologne.de)
Received: from smtp4.netcologne.de (smtp4.netcologne.de [194.8.194.137])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F7DF8FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Mar 2009 17:17:40 +0000 (UTC)
	(envelope-from tmseck@netcologne.de)
Received: from laurel.tmseck.homedns.org (xdsl-213-196-242-46.netcologne.de [213.196.242.46])
	by smtp4.netcologne.de (Postfix) with SMTP id 4B792DA6F3
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Mar 2009 18:17:39 +0100 (CET)
Received: (qmail 950 invoked from network); 28 Mar 2009 17:17:39 -0000
Received: from unknown (HELO hardy.tmseck.homedns.org) (192.168.1.2)
  by 0 with SMTP; 28 Mar 2009 17:17:39 -0000
Received: from hardy.tmseck.homedns.org (localhost [127.0.0.1])
	by hardy.tmseck.homedns.org (8.14.3/8.14.3) with ESMTP id n2SHHcu9039671;
	Sat, 28 Mar 2009 18:17:38 +0100 (CET)
	(envelope-from tmseck@netcologne.de)
Received: (from thomas@localhost)
	by hardy.tmseck.homedns.org (8.14.3/8.14.3/Submit) id n2SHHcH4039670;
	Sat, 28 Mar 2009 18:17:38 +0100 (CET)
	(envelope-from tmseck@netcologne.de)
Message-Id: <200903281717.n2SHHcH4039670@hardy.tmseck.homedns.org>
Date: Sat, 28 Mar 2009 18:17:38 +0100 (CET)
From: Thomas-Martin Seck <tmseck@web.de>
Reply-To: Thomas-Martin Seck <tmseck@web.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [Maintainer] www/squid, www/squid30: fix endianness handling in squid_kerb_auth
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         133159
>Category:       ports
>Synopsis:       [Maintainer] www/squid, www/squid30: fix endianness handling in squid_kerb_auth
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 28 17:20:02 UTC 2009
>Closed-Date:    Tue Mar 31 22:22:21 UTC 2009
>Last-Modified:  Tue Mar 31 22:22:21 UTC 2009
>Originator:     Thomas-Martin Seck
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
a private site in Germany
>Environment:
FreeBSD ports collection as of March 28, 2009.

	
>Description:
The squid_kerb_auth helper needs to know about the endianness of the system
at compile time. Its author suggests to use -D__LITTLE_ENDIAN__ in the
program's Makefile and this is the solution proposed in ports/131878. Since
FreeBSD (and FreeBSD ports) might be used on big-endian architectures as
well as on little endian architectures I decided to instrument an already
present endianness check directly in the affected source file instead.

Bump PORTREVISION since this affects the content (and functionality) of
the port's binary package.

This update addresses ports/131878 which can be closed.
	
>How-To-Repeat:
	
>Fix:
Apply this patch to www/squid:

Index: Makefile
===================================================================
--- Makefile	(.../www/squid)	(revision 1567)
+++ Makefile	(.../local/squid)	(revision 1567)
@@ -76,6 +76,7 @@
 
 PORTNAME=	squid
 PORTVERSION=	2.7.${SQUID_STABLE_VER}
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
 		ftp://mirrors.24-7-solutions.net/pub/squid/%SUBDIR%/ \
Index: files/patch-squid_kerb_auth
===================================================================
--- files/patch-squid_kerb_auth	(.../www/squid)	(revision 1567)
+++ files/patch-squid_kerb_auth	(.../local/squid)	(revision 1567)
@@ -557,3 +557,25 @@
  #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
  #else
  #include <gssapi/gssapi.h>
+--- helpers/negotiate_auth/squid_kerb_auth/spnegohelp/derparse.c.orig	2007-05-15 01:36:32.000000000 +0200
++++ helpers/negotiate_auth/squid_kerb_auth/spnegohelp/derparse.c	2009-03-28 17:21:54.000000000 +0100
+@@ -22,12 +22,19 @@
+ //
+ /////////////////////////////////////////////////////////////
+ 
++#include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <memory.h>
+ #include "spnego.h"
+ #include "derparse.h"
+ 
++#ifdef WORDS_BIGENDIAN
++#undef __LITTLE_ENDIAN__
++#else
++#define __LITTLE_ENDIAN__ 1
++#endif
++
+ //
+ // The GSS Mechanism OID enumeration values (SPNEGO_MECH_OID) control which offset in
+ // the array below, that a mechanism can be found.
	


Apply this patch to www/squid30:

Index: Makefile
===================================================================
--- Makefile	(.../www/squid30)	(revision 1567)
+++ Makefile	(.../local/squid30)	(revision 1567)
@@ -61,6 +61,7 @@
 
 PORTNAME=	squid
 PORTVERSION=	3.0.${SQUID_STABLE_VER}
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
 		ftp://mirrors.24-7-solutions.net/pub/squid/%SUBDIR%/ \
Index: files/patch-squid_kerb_auth
===================================================================
--- files/patch-squid_kerb_auth	(.../www/squid30)	(revision 1567)
+++ files/patch-squid_kerb_auth	(.../local/squid30)	(revision 1567)
@@ -466,3 +466,25 @@
  #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
  #else
  #include <gssapi/gssapi.h>
+--- helpers/negotiate_auth/squid_kerb_auth/spnegohelp/derparse.c.orig	2009-03-28 17:01:45.000000000 +0100
++++ helpers/negotiate_auth/squid_kerb_auth/spnegohelp/derparse.c	2009-03-28 17:06:55.000000000 +0100
+@@ -22,12 +22,19 @@
+ //
+ /////////////////////////////////////////////////////////////
+ 
++#include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <memory.h>
+ #include "spnego.h"
+ #include "derparse.h"
+ 
++#ifdef WORDS_BIGENDIAN
++#undef __LITTLE_ENDIAN__
++#else
++#define __LITTLE_ENDIAN__ 1
++#endif
++
+ //
+ // The GSS Mechanism OID enumeration values (SPNEGO_MECH_OID) control which offset in
+ // the array below, that a mechanism can be found.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sat Mar 28 17:32:45 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133159 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Mar 31 22:22:20 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

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