Bumped PKGREVSION to 1;

Changed MAINTAINER to my netbsd.org address (from eric@cirr.com)

Renamed existing patches to follow new convention
    patch-aa -> patch-Makefile
    patch-af -> patch-configure

Added patches to cure segfaults found since 2.2.11's release
    patch-router_router.c	correct a segfault in the router
    patch-s2s_out.c		Resolver doesn't return IPv4 Address if
				resolve_aaaa (IPv6) is enabled
    patch-sm_sm.c		fix segfault when debugging is turned on/up
This commit is contained in:
schnoebe 2011-02-06 19:23:51 +00:00
parent 7e097075b6
commit cf8fa5d3ba
7 changed files with 97 additions and 7 deletions

View file

@ -1,11 +1,12 @@
# $NetBSD: Makefile,v 1.62 2011/01/28 13:35:49 adam Exp $
# $NetBSD: Makefile,v 1.63 2011/02/06 19:23:51 schnoebe Exp $
DISTNAME= jabberd-2.2.11
PKGREVISION= 1
CATEGORIES= chat
MASTER_SITES= http://codex.xiaoka.com/pub/jabberd2/releases/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= eric@cirr.com
MAINTAINER= schnoebe@netbsd.org
HOMEPAGE= http://jabberd2.xiaoka.com/
COMMENT= XMPP (Jabber) instant messaging server
LICENSE= gnu-gpl-v2

View file

@ -1,7 +1,10 @@
$NetBSD: distinfo,v 1.23 2011/01/28 13:35:51 adam Exp $
$NetBSD: distinfo,v 1.24 2011/02/06 19:23:51 schnoebe Exp $
SHA1 (jabberd-2.2.11.tar.bz2) = 32956231dd5ab5a242545907341fab9bc6007d22
RMD160 (jabberd-2.2.11.tar.bz2) = d4bac0f0cbf41788e5504ca1796f910b27c813d1
Size (jabberd-2.2.11.tar.bz2) = 659500 bytes
SHA1 (patch-aa) = 0db128003f37425a1b7b315f526828f2e328ddb4
SHA1 (patch-af) = 0a30ddc50345278eb8a20825f87754c914720b05
SHA1 (patch-Makefile.in) = 0db128003f37425a1b7b315f526828f2e328ddb4
SHA1 (patch-configure) = 0a30ddc50345278eb8a20825f87754c914720b05
SHA1 (patch-router_router.c) = 04edab379f11ab42a9cbff7ab4466594273f5a1c
SHA1 (patch-s2s_out.c) = 64454597acae90bc3926b4a28eba5a177e9f8413
SHA1 (patch-sm_sm.c) = 9386f560d609316c209e56624e8b5e71ba43e7df

View file

@ -1,4 +1,4 @@
$NetBSD: patch-aa,v 1.10 2010/11/09 07:33:11 adam Exp $
$NetBSD: patch-Makefile.in,v 1.1 2011/02/06 19:23:51 schnoebe Exp $
--- Makefile.in.orig 2010-08-08 15:51:13.000000000 +0000
+++ Makefile.in

View file

@ -1,4 +1,4 @@
$NetBSD: patch-af,v 1.7 2010/11/09 07:33:11 adam Exp $
$NetBSD: patch-configure,v 1.1 2011/02/06 19:23:51 schnoebe Exp $
--- configure.orig 2010-08-08 15:51:09.000000000 +0000
+++ configure

View file

@ -0,0 +1,16 @@
$NetBSD: patch-router_router.c,v 1.1 2011/02/06 19:23:51 schnoebe Exp $
# correct a segfault in the router
# fixed upstream as r920 (will be in 2.2.12)
--- router/router.c.orig 2010-08-08 15:50:56.000000000 +0000
+++ router/router.c
@@ -886,7 +886,7 @@ static int _router_sx_callback(sx_t s, s
}
/* top element must be router scoped */
- if(NAD_NURI_L(nad, NAD_ENS(nad, 0)) != strlen(uri_COMPONENT) || strncmp(uri_COMPONENT, NAD_NURI(nad, NAD_ENS(nad, 0)), strlen(uri_COMPONENT)) != 0) {
+ if(NAD_ENS(nad, 0) < 0 || NAD_NURI_L(nad, NAD_ENS(nad, 0)) != strlen(uri_COMPONENT) || strncmp(uri_COMPONENT, NAD_NURI(nad, NAD_ENS(nad, 0)), strlen(uri_COMPONENT)) != 0) {
log_debug(ZONE, "invalid packet namespace, dropping");
nad_free(nad);
return 0;

View file

@ -0,0 +1,54 @@
$NetBSD: patch-s2s_out.c,v 1.1 2011/02/06 19:23:51 schnoebe Exp $
# Resolver doesn't return IPv4 Address if resolve_aaaa (IPv6) is enabled
# fixed upstream as part of r915 (will be available in 2.2.12)
--- s2s/out.c (revision 914)
+++ s2s/out.c (revision 915)
@@ -1071,10 +1071,8 @@
/* resolve hostname */
free(query->cur_host);
- query->cur_host = strndup(ipport, ipport_len);
- tmp = malloc(sizeof(char) * port_len + 1);
- strncpy(tmp, c, port_len);
- tmp[port_len] = '\0';
+ query->cur_host = strndup(ipport, ip_len);
+ tmp = strndup(c, port_len);
query->cur_port = atoi(tmp);
free(tmp);
query->cur_prio = res->prio;
@@ -1082,29 +1080,23 @@
query->cur_expiry = res->expiry;
log_debug(ZONE, "dns ttl for %s@%p limited to %d", query->name, query, query->cur_expiry);
- tmp = malloc(sizeof(char) * ip_len + 1);
- strncpy(tmp, ipport, ip_len);
- tmp[ip_len] = '\0';
-
if (query->s2s->resolve_aaaa) {
- log_debug(ZONE, "dns request for %s@%p: AAAA %s", query->name, query, tmp);
+ log_debug(ZONE, "dns request for %s@%p: AAAA %s", query->name, query, query->cur_host);
- query->query = dns_submit_a6(NULL, tmp, DNS_NOSRCH, _dns_result_aaaa, query);
+ query->query = dns_submit_a6(NULL, query->cur_host, DNS_NOSRCH, _dns_result_aaaa, query);
/* if submit failed, call ourselves with a NULL result */
if (query->query == NULL)
_dns_result_aaaa(ctx, NULL, query);
} else {
- log_debug(ZONE, "dns request for %s@%p: A %s", query->name, query, tmp);
+ log_debug(ZONE, "dns request for %s@%p: A %s", query->name, query, query->cur_host);
- query->query = dns_submit_a4(NULL, tmp, DNS_NOSRCH, _dns_result_a, query);
+ query->query = dns_submit_a4(NULL, query->cur_host, DNS_NOSRCH, _dns_result_a, query);
/* if submit failed, call ourselves with a NULL result */
if (query->query == NULL)
_dns_result_a(ctx, NULL, query);
}
-
- free(tmp);
/* finished */
} else {

View file

@ -0,0 +1,16 @@
$NetBSD: patch-sm_sm.c,v 1.1 2011/02/06 19:23:51 schnoebe Exp $
# fix segfault when debugging is turned on/up.
# fixed up stream as part of r910 (will be released with 2.2.12)
--- sm/sm.c.orig 2010-08-08 15:50:55.000000000 +0000
+++ sm/sm.c
@@ -138,7 +138,7 @@ int sm_sx_callback(sx_t s, sx_event_t e,
elem = nad_append_elem(nad, ns, "bind", 0);
nad_set_attr(nad, elem, -1, "name", domain, len);
nad_append_attr(nad, -1, "multi", "to");
- log_debug(ZONE, "requesting domain bind for '%.*s'", domain, len);
+ log_debug(ZONE, "requesting domain bind for '%.*s'", len, domain);
sx_nad_write(sm->router, nad);
} while(xhash_iter_next(sm->hosts));