rpms/bind/devel bind-9.5-spnego-memory_management.patch, NONE, 1.1 bind.spec, 1.204, 1.205

Adam Tkac (atkac) fedora-extras-commits at redhat.com
Mon Aug 13 16:07:20 UTC 2007


Author: atkac

Update of /cvs/pkgs/rpms/bind/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12027

Modified Files:
	bind.spec 
Added Files:
	bind-9.5-spnego-memory_management.patch 
Log Message:
- disable 64bit dlz driver patch on alpha and ia64 (#251298)
- remove wrong malloc functions from lib/dns/spnego.c (#251853)


bind-9.5-spnego-memory_management.patch:

--- NEW FILE bind-9.5-spnego-memory_management.patch ---
diff -up bind-9.5.0a6/lib/dns/spnego.c.memory_management bind-9.5.0a6/lib/dns/spnego.c
--- bind-9.5.0a6/lib/dns/spnego.c.memory_management	2007-08-13 17:59:03.000000000 +0200
+++ bind-9.5.0a6/lib/dns/spnego.c	2007-08-13 17:59:44.000000000 +0200
@@ -169,88 +169,6 @@
  */
 #include "spnego.h"
 
-/*
- * The isc_mem function keep track of allocation sizes, but we can't
- * get at that information, and we need to know sizes to implement a
- * realloc() clone.  So we use a little more memory to keep track of
- * sizes allocated here.
- *
- * These functions follow Harbison & Steele, 4th edition, particularly
- * with regard to realloc()'s behavior.
- */
-
-static void *
-spnego_malloc(size_t size, const char *file, int line)
-{
-	char *p;
-
-	if (size == 0)
-		return (NULL);
-	p = isc_mem_allocate(dst__memory_pool, size + sizeof(size_t));
-	if (p == NULL)
-		return NULL;
-	*(size_t *)p = size;
-	p += sizeof(size_t);
-#ifdef SPNEGO_ALLOC_DEBUG
-	printf("spnego_malloc(%lu) %lx %s %u\n",
-	       (unsigned long) size, (unsigned long) p, file, line);
-#else
-	(void)file;
-	(void)line;
-#endif
-	return (p);
-}
-	
-static void
-spnego_free(void *ptr, const char *file, int line)
-{
-	char *p = ptr;
-
-	if (p == NULL)
-		return;
-#ifdef SPNEGO_ALLOC_DEBUG
-	printf("spnego_free(%lx) %s %u\n",
-	       (unsigned long) p, file, line);
-#else
-	(void)file;
-	(void)line;
-#endif
-	p -= sizeof(size_t);
-	isc_mem_free(dst__memory_pool, p);
-}
-
-static void *
-spnego_realloc(void *old_ptr, size_t new_size, const char *file, int line)
-{
-	size_t *old_size;
-	void *new_ptr;
-
-	if (old_ptr == NULL)
-		return (spnego_malloc(new_size, file, line));
-
-	if (new_size == 0) {
-		spnego_free(old_ptr, file, line);
-		return (NULL);
-	}
-
-	old_size = old_ptr;
-	old_size--;
-	if (*old_size >= new_size)
-		return (old_ptr);
-
-	new_ptr = spnego_malloc(new_size, file, line);
-	if (new_ptr == NULL)
-		return (NULL);
-
-	memcpy(new_ptr, old_ptr, *old_size);
-	spnego_free(old_ptr, file, line);
-	return (new_ptr);
-}
-
-#define	malloc(x)	spnego_malloc(x,	__FILE__, __LINE__)
-#define	free(x)		spnego_free(x,		__FILE__, __LINE__)
-#define	realloc(x,y)	spnego_realloc(x, y,	__FILE__, __LINE__)
-
 /* asn1_err.h */
 /* Generated from ../../../lib/asn1/asn1_err.et */
 


Index: bind.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bind/devel/bind.spec,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -r1.204 -r1.205
--- bind.spec	6 Aug 2007 09:25:41 -0000	1.204
+++ bind.spec	13 Aug 2007 16:06:46 -0000	1.205
@@ -2,13 +2,8 @@
 #               Red Hat BIND package .spec file
 #
 
-#		Release numbers
-
-%define BIND_MAJORVER		9
-%define BIND_MINORVER		5
-%define BIND_PATCHVER		0
-%define BIND_RELEASETYPE	a
-%define BIND_RELEASEVER		6
+%define BIND_VERSION 9.5.0
+%define BIND_RELEASE a6
 
 %{?!SDB:        %define SDB         1}
 %{?!LIBBIND:    %define LIBBIND	    1}
@@ -26,14 +21,14 @@
 Summary: 	The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server.
 Name: 		bind
 License: 	ISC
-Version: 	%{BIND_MAJORVER}.%{BIND_MINORVER}.%{BIND_PATCHVER}
-Release: 	8.2.%{BIND_RELEASETYPE}%{BIND_RELEASEVER}%{?dist}
+Version: 	%{BIND_VERSION}
+Release: 	9.%{BIND_RELEASE}%{?dist}
 Epoch:   	32
 Url: 		http://www.isc.org/products/BIND/
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Group: 		System Environment/Daemons
 #
-Source: 	ftp://ftp.isc.org/isc/bind9/%{version}/bind-%{version}%{BIND_RELEASETYPE}%{BIND_RELEASEVER}.tar.gz
+Source: 	ftp://ftp.isc.org/isc/bind9/%{version}/bind-%{version}%{BIND_RELEASE}.tar.gz
 Source1: 	named.sysconfig
 Source2: 	named.init
 Source3: 	named.logrotate
@@ -53,7 +48,7 @@
 Source24:	libbind.pc
 Source25:	named.conf.sample
 Source28:	config.tar
-Source29:	bind-%{version}%{BIND_RELEASETYPE}%{BIND_RELEASEVER}.1-autotools.tar.bz2
+Source29:	bind-%{version}%{BIND_RELEASE}.1-autotools.tar.bz2
 Source30:	ldap2zone.c
 
 # Common patches
@@ -70,6 +65,7 @@
 Patch69:	bind-9.5.0-generate-xml.patch
 Patch71:	bind-9.5-overflow.patch
 Patch72:	bind-9.5-dlz-64bit.patch
+Patch74:	bind-9.5-spnego-memory_management.patch
 
 # SDB patches
 Patch11: 	bind-9.3.2b2-sdbsrc.patch
@@ -187,7 +183,7 @@
 Based off code from Jan "Yenya" Kasprzak <kas at fi.muni.cz>
 
 %prep
-%setup -q -n %{name}-%{version}%{BIND_RELEASETYPE}%{BIND_RELEASEVER}
+%setup -q -n %{name}-%{version}%{BIND_RELEASE}
 
 tar -xvf %{SOURCE29}
 patch -p1 -b < patch
@@ -247,8 +243,11 @@
 %endif
 %patch63 -p1 -b .directory
 %patch71 -p1 -b .overflow
+%ifnarch alpha ia64
 %patch72 -p1 -b .64bit
+%endif
 %patch73 -p1 -b .libidn
+%patch74 -p1 -b .memory
 :;
 
 
@@ -681,6 +680,10 @@
 %{_sbindir}/bind-chroot-admin
 
 %changelog
+* Mon Aug 13 2007 Adam Tkac <atkac redhat com> 32:9.5.0-9.a6
+- disable 64bit dlz driver patch on alpha and ia64 (#251298)
+- remove wrong malloc functions from lib/dns/spnego.c (#251853)
+
 * Mon Aug 06 2007 Adam Tkac <atkac redhat com> 32:9.5.0-8.2.a6
 - changed licence from BSD-like to ISC
 




More information about the fedora-extras-commits mailing list