[ypbind/f16] consider all 127.0.0.0/8 as localhost addresses Related: #829487

Honza Horak hhorak at fedoraproject.org
Tue Jul 10 08:56:14 UTC 2012


commit f244b4182fabd305e8f4ecdf6ec2d627a33a1e1f
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Tue Jul 10 10:56:02 2012 +0200

    consider all 127.0.0.0/8 as localhost addresses
    Related: #829487

 ypbind-nmlocal.patch |    2 +-
 ypbind.spec          |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ypbind-nmlocal.patch b/ypbind-nmlocal.patch
index 3828ea3..6734d0b 100644
--- a/ypbind-nmlocal.patch
+++ b/ypbind-nmlocal.patch
@@ -29,7 +29,7 @@ diff -up ypbind-mt-1.35/src/serv_list.c.nmlocal ypbind-mt-1.35/src/serv_list.c
 +        {
 +	  if (domainlist[i].server[s].host == NULL)
 +	    break;
-+          if (strcmp(inet_ntoa(domainlist[i].server[s].addr), "127.0.0.1") == 0)
++          if (strncmp(inet_ntoa(domainlist[i].server[s].addr), "127", 3) == 0)
 +            {
 +       	      localhost_used = 1;
 +      	      return;
diff --git a/ypbind.spec b/ypbind.spec
index 15cec93..5c4ba34 100644
--- a/ypbind.spec
+++ b/ypbind.spec
@@ -1,7 +1,7 @@
 Summary: The NIS daemon which binds NIS clients to an NIS domain
 Name: ypbind
 Version: 1.35
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@@ -117,6 +117,10 @@ fi
 %doc README NEWS COPYING
 
 %changelog
+* Tue Jul 10 2012 Honza Horak <hhorak at redhat.com> - 3:1.35-5
+- consider all 127.0.0.0/8 as localhost addresses
+  Related: #829487
+
 * Mon Jul 09 2012 Honza Horak <hhorak at redhat.com> - 3:1.35-4
 - don't go offline when one of NIS servers is localhost
   Related: #829487


More information about the scm-commits mailing list