On Sun, 06 Jan 2013 23:43:01 +0100, Martin Gerhard Loschwitz wrote:

> >> On Tue, 01 Jan 2013 20:39:28 +0000, Adam D. Barratt wrote:
> >> If the maintainer is busy, I can upload to t-p-u.
> >> Debdiff attached (just the patch from unstable).
> > I've not seen a followup from the maintainer, but from my side that
> > would be appreciated; thanks.
> Go ahead and upload pretty please. Thanks a lot, much appreciated!

Thanks to both of you; uploaded.


I'm attaching the final debdiff in case you want to import it into a
VCS.


Cheers,
gregor
 
-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rolling Stones: Youwin
diff -Nru resource-agents-3.9.2/debian/changelog resource-agents-3.9.2/debian/changelog
--- resource-agents-3.9.2/debian/changelog	2011-11-15 18:22:49.000000000 +0100
+++ resource-agents-3.9.2/debian/changelog	2013-01-06 23:49:52.000000000 +0100
@@ -1,3 +1,16 @@
+resource-agents (1:3.9.2-5+deb7u1) testing-proposed-updates; urgency=low
+
+  * Non-maintainer upload.
+  * Backport patch from unstable (refreshed to fix offset).
+    Original changelog entry:
+
+  [ Martin Loschwitz ]
+  * debian/patches/fix-gethostinfo-v2.patch: Applied a patch by Zang 
+    MingJie, edited by Ruben Laban, to fix a problem related to IPv6 in
+    ldirectord (Closes: #675913)
+
+ -- gregor herrmann <gre...@debian.org>  Sun, 06 Jan 2013 23:49:21 +0100
+
 resource-agents (1:3.9.2-5) unstable; urgency=high
 
   * debian/control: Fix the Conflicts and Replaces lines of resource-agents
diff -Nru resource-agents-3.9.2/debian/patches/fix-gethostinfo-v2.patch resource-agents-3.9.2/debian/patches/fix-gethostinfo-v2.patch
--- resource-agents-3.9.2/debian/patches/fix-gethostinfo-v2.patch	1970-01-01 01:00:00.000000000 +0100
+++ resource-agents-3.9.2/debian/patches/fix-gethostinfo-v2.patch	2013-01-02 04:42:04.000000000 +0100
@@ -0,0 +1,73 @@
+--- a/ldirectord/ldirectord.in
++++ b/ldirectord/ldirectord.in
+@@ -827,8 +827,7 @@
+ use Pod::Usage;
+ #use English;
+ #use Time::HiRes qw( gettimeofday tv_interval );
+-use Socket;
+-use Socket6;
++use Socket qw( :DEFAULT inet_pton getaddrinfo getnameinfo NI_NUMERICHOST NI_NUMERICSERV NI_NAMEREQD );
+ use Sys::Hostname;
+ use POSIX qw(setsid :sys_wait_h);
+ use Sys::Syslog qw(:DEFAULT setlogsock);
+@@ -4013,7 +4012,7 @@
+ {
+ 	my ($v, $r, $force) = (@_);
+ 
+-	if ($r->{failcount} > 0) {
++	if (defined($r->{failcount}) && $r->{failcount} > 0) {
+ 		ld_log("Resetting soft failure count: " . $r->{server} . ":" .
+ 		       $r->{port} . " (" . get_virtual_id_str($v) . ")");
+ 	}
+@@ -5039,17 +5038,21 @@
+ 	if ($name =~ /\[(.*)\]/) {
+ 		$name = $1;
+ 	}
+-	my @host = getaddrinfo($name, 0, $af);
+-	if (!defined($host[3])) {
+-		return undef;
+-	}
+-	my @ret = getnameinfo($host[3], NI_NUMERICHOST | NI_NUMERICSERV);
+-	if ($host[0] == AF_INET6) {
+-		return "[$ret[0]]";
+-	}
+-	else {
+-		return $ret[0];
++	my %hints = ( family => $af );
++	my ( $err, @res ) = getaddrinfo($name, 0, \%hints);
++	return undef if ($err);
++	while( my $ai = shift @res ) {
++		my ( $err, $hostname, $servicename ) = getnameinfo( $ai->{addr}, NI_NUMERICHOST );
++		if (!$err) {
++			if ($ai->{family} == AF_INET6) {
++				return "[$hostname]";
++			}
++			else {
++				return $hostname;
++			}
++		}
+ 	}
++	return undef;
+ }
+ 
+ # ld_gethostbyaddr
+@@ -5064,13 +5067,13 @@
+ 	my ($ip)=(@_);
+ 
+ 	$ip = &ld_strip_brackets($ip);
+-	my @host = getaddrinfo($ip,0);
+-	if (!defined($host[3])) {
+-		return undef;
++	my ( $err, @res ) = getaddrinfo($ip,0);
++	return undef if ($err);
++	while( my $ai = shift @res ) {
++		my ( $err, $host, $service ) = getnameinfo($ai->{addr}, NI_NAMEREQD);
++		return $host unless($err);
+ 	}
+-	my @ret = getnameinfo($host[3], NI_NAMEREQD);
+-	return undef unless(scalar(@ret) == 2);
+-	return $ret[0];
++	return undef;
+ }
+ 
+ # ld_getservbyname
diff -Nru resource-agents-3.9.2/debian/patches/series resource-agents-3.9.2/debian/patches/series
--- resource-agents-3.9.2/debian/patches/series	2011-10-20 13:50:50.000000000 +0200
+++ resource-agents-3.9.2/debian/patches/series	2013-01-02 04:35:00.000000000 +0100
@@ -2,3 +2,4 @@
 02_spelling_fixes.patch
 CVE-2010-3389--bug598549.patch
 mysql-path.patch
+fix-gethostinfo-v2.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to