[nfs-utils] sm-notify needs to call res_init() before each try (bz 625531)

Steve Dickson steved at fedoraproject.org
Fri Oct 15 20:50:51 UTC 2010


commit 1560f8a6281eca371b08c871cf14621ef372de45
Author: Steve Dickson <steved at redhat.com>
Date:   Fri Oct 15 16:50:09 2010 -0400

    sm-notify needs to call res_init() before each try (bz 625531)
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-utils-1.2.3-sm-notify-res_init.patch |   21 +++++++++++++++++++++
 nfs-utils.spec                           |    3 +++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/nfs-utils-1.2.3-sm-notify-res_init.patch b/nfs-utils-1.2.3-sm-notify-res_init.patch
new file mode 100644
index 0000000..3ce55eb
--- /dev/null
+++ b/nfs-utils-1.2.3-sm-notify-res_init.patch
@@ -0,0 +1,21 @@
+diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
+--- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig	2010-09-28 08:24:16.000000000 -0400
++++ nfs-utils-1.2.3/utils/statd/sm-notify.c	2010-10-15 16:44:43.487119601 -0400
+@@ -28,6 +28,9 @@
+ #include <netdb.h>
+ #include <errno.h>
+ #include <grp.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#include <resolv.h>
+ 
+ #include "sockaddr.h"
+ #include "xlog.h"
+@@ -84,6 +87,7 @@ smn_lookup(const char *name)
+ 	};
+ 	int error;
+ 
++	res_init();
+ 	error = getaddrinfo(name, NULL, &hint, &ai);
+ 	if (error != 0) {
+ 		xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error));
diff --git a/nfs-utils.spec b/nfs-utils.spec
index c22632d..11f9f04 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -23,6 +23,7 @@ Patch001: nfs-utils-1.2.4-rc1.patch
 Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.2-statdpath.patch
 Patch102: nfs-utils-1.2.1-exp-subtree-warn-off.patch
+Patch103: nfs-utils-1.2.3-sm-notify-res_init.patch
 
 Group: System Environment/Daemons
 Provides: exportfs    = %{epoch}:%{version}-%{release}
@@ -76,6 +77,7 @@ This package also contains the mount.nfs and umount.nfs program.
 %patch100 -p1
 %patch101 -p1
 %patch102 -p1
+%patch103 -p1
 
 # Remove .orig files
 find . -name "*.orig" | xargs rm -f
@@ -253,6 +255,7 @@ fi
 %changelog
 * Fri Oct 15 2010 Steve Dickson <steved at redhat.com> 1.2.3-2
 - Initscripts do not conform to LSB specification (bz 621562)
+- sm-notify needs to call res_init() before each try (bz 625531)
 
 * Thu Oct 14 2010 Steve Dickson <steved at redhat.com> 1.2.3-1
 - Updated to latest upstream release: nfs-utils-1-2-4-rc1


More information about the scm-commits mailing list