[libnfsidmap] Fixed Local-Realms debugging (bz 804151)

Steve Dickson steved at fedoraproject.org
Mon Mar 19 20:34:33 UTC 2012


commit 2275628e3c02857c6ce33878ff59bed3f277bcc8
Author: Steve Dickson <steved at redhat.com>
Date:   Mon Mar 19 16:31:40 2012 -0400

    Fixed Local-Realms debugging (bz 804151)
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 libnfsidmap-0.25-realm-debug.patch |   29 +++++++++++++++++++++++++++++
 libnfsidmap.spec                   |    9 ++++++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/libnfsidmap-0.25-realm-debug.patch b/libnfsidmap-0.25-realm-debug.patch
new file mode 100644
index 0000000..75b5286
--- /dev/null
+++ b/libnfsidmap-0.25-realm-debug.patch
@@ -0,0 +1,29 @@
+commit f079113f90366f1965b9fd3b0fdbce77415f37a7
+Author: Juno Krahn <Juno.Krahn at gmail.com>
+Date:   Mon Mar 19 08:33:58 2012 -0400
+
+    idmapd: logging of Local-Realms only lists the last realm
+    
+    The list of local realms can be logged with a massage like the following:
+       rpc.idmapd: libnfsidmap: Realms list: 'EXAMPLE2.COM'
+    Instead of printing a list of realms, only the last realm in the list is shown.
+    
+    https://bugzilla.redhat.com/show_bug.cgi?id=804152
+    
+    Signed-off-by: Steve Dickson <steved at redhat.com>
+
+diff --git a/libnfsidmap.c b/libnfsidmap.c
+index 57bb6c3..641d766 100644
+--- a/libnfsidmap.c
++++ b/libnfsidmap.c
+@@ -285,8 +285,9 @@ int nfs4_init_name_mapping(char *conffile)
+ 			}
+ 			buf = malloc(siz);
+ 			if (buf) {
++				*buf = 0;
+ 				TAILQ_FOREACH(r, &local_realms->fields, link) {
+-					sprintf(buf, "'%s' ", r->field);
++					sprintf(buf+strlen(buf), "'%s' ", r->field);
+ 				}
+ 				IDMAP_LOG(1, ("libnfsidmap: Realms list: %s", buf));
+ 				free(buf);
diff --git a/libnfsidmap.spec b/libnfsidmap.spec
index c995a23..962f3ec 100644
--- a/libnfsidmap.spec
+++ b/libnfsidmap.spec
@@ -3,7 +3,7 @@
 Summary: NFSv4 User and Group ID Mapping Library
 Name: libnfsidmap
 Version: 0.25
-Release: 1%{?dist}
+Release: 2%{?dist}
 Provides: nfs-utils-lib
 Obsoletes: nfs-utils-lib
 URL: http://www.citi.umich.edu/projects/nfsv4/linux/
@@ -13,6 +13,8 @@ License: BSD
 
 Source0: http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/%{name}-%{version}.tar.gz
 
+Patch001: libnfsidmap-0.25-realm-debug.patch
+
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: pkgconfig, openldap-devel
@@ -37,6 +39,8 @@ developing programs which use the libnfsidmap library.
 %prep
 %setup -q 
 
+%patch001 -p1 
+
 %build
 ./autogen.sh
 %configure --disable-static  --with-pluginpath=%{_root_libdir}/%name
@@ -81,6 +85,9 @@ rm -rf %{buildroot}
 %{_root_libdir}/*.so
 
 %changelog
+* Mon Mar 19 2012 Steve Dickson <steved at redhat.com>  0.20-2
+- Fixed Local-Realms debugging (bz 804151)
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.25-1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list