[ntp] avoid rereading /etc/services (#768804)

Miroslav Lichvar mlichvar at fedoraproject.org
Tue Apr 2 17:37:39 UTC 2013


commit 856b32eed08621d7c82a87d83b374b737861aa00
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date:   Thu Mar 28 18:40:28 2013 +0100

    avoid rereading /etc/services (#768804)

 ntp-4.2.6p5-noservres.patch |   12 ++++++++++++
 ntp.spec                    |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ntp-4.2.6p5-noservres.patch b/ntp-4.2.6p5-noservres.patch
new file mode 100644
index 0000000..1f579ce
--- /dev/null
+++ b/ntp-4.2.6p5-noservres.patch
@@ -0,0 +1,12 @@
+diff -up ntp-4.2.6p5/libntp/decodenetnum.c.noservres ntp-4.2.6p5/libntp/decodenetnum.c
+--- ntp-4.2.6p5/libntp/decodenetnum.c.noservres	2011-08-04 06:13:43.000000000 +0200
++++ ntp-4.2.6p5/libntp/decodenetnum.c	2013-03-28 18:38:49.239727130 +0100
+@@ -70,7 +70,7 @@ decodenetnum(
+ 	}
+ 	ZERO(hints);
+ 	hints.ai_flags = Z_AI_NUMERICHOST;
+-	err = getaddrinfo(cp, "ntp", &hints, &ai);
++	err = getaddrinfo(cp, NULL, &hints, &ai);
+ 	if (err != 0)
+ 		return 0;
+ 	NTP_INSIST(ai->ai_addrlen <= sizeof(*netnum));
diff --git a/ntp.spec b/ntp.spec
index 5accc79..24a6cc4 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -85,6 +85,8 @@ Patch17: ntp-4.2.6p3-broadcastdelay.patch
 Patch18: ntp-4.2.6p5-delaycalib.patch
 # ntpbz #2019
 Patch19: ntp-4.2.6p5-pwcipher.patch
+# ntpbz #2320
+Patch20: ntp-4.2.6p5-noservres.patch
 
 # handle unknown clock types
 Patch50: ntpstat-0.2-clksrc.patch
@@ -192,6 +194,7 @@ This package contains NTP documentation in HTML format.
 %patch17 -p1 -b .broadcastdelay
 %patch18 -p1 -b .delaycalib
 %patch19 -p1 -b .pwcipher
+%patch20 -p1 -b .noservres
 
 # ntpstat patches
 %patch50 -p1 -b .clksrc


More information about the scm-commits mailing list