rpms/nfs-utils-lib/F-9 nfs-utils-lib-1.1.1-idmapd-domain-dns.patch, NONE, 1.1 nfs-utils-lib.spec, 1.30, 1.31

Steve Dickson (steved) fedora-extras-commits at redhat.com
Thu Jul 10 17:56:12 UTC 2008


Author: steved

Update of /cvs/pkgs/rpms/nfs-utils-lib/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23908

Modified Files:
	nfs-utils-lib.spec 
Added Files:
	nfs-utils-lib-1.1.1-idmapd-domain-dns.patch 
Log Message:
- Use the getdomainname() not the latter half of a 
  hostname to determine the DNS domainname.


nfs-utils-lib-1.1.1-idmapd-domain-dns.patch:

--- NEW FILE nfs-utils-lib-1.1.1-idmapd-domain-dns.patch ---
--- nfs-utils-lib-1.1.1/libnfsidmap/libnfsidmap.c.orig	2006-09-05 10:09:00.000000000 -0400
+++ nfs-utils-lib-1.1.1/libnfsidmap/libnfsidmap.c	2008-07-10 13:21:57.560028000 -0400
@@ -47,6 +47,7 @@
 #include <err.h>
 #include <syslog.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include "nfsidmap.h"
 #include "nfsidmap_internal.h"
 #include "cfg.h"
@@ -75,16 +76,13 @@
 
 static int domain_from_dns(char **domain)
 {
-	struct hostent *he;
-	char hname[64], *c;
+	char mydomain[BUFSIZ];
 
-	if (gethostname(hname, sizeof(hname)) == -1)
+	*domain = NULL;
+	if (getdomainname(mydomain, sizeof(mydomain)) < 0)
 		return -1;
-	if ((he = gethostbyname(hname)) == NULL)
-		return -1;
-	if ((c = strchr(he->h_name, '.')) == NULL || *++c == '\0')
-		return -1;
-	*domain = strdup(c);
+
+	*domain = strdup(mydomain);
 	return 0;
 }
 


Index: nfs-utils-lib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nfs-utils-lib/F-9/nfs-utils-lib.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- nfs-utils-lib.spec	27 Jun 2008 16:59:45 -0000	1.30
+++ nfs-utils-lib.spec	10 Jul 2008 17:55:21 -0000	1.31
@@ -1,7 +1,7 @@
 Summary: Network File System Support Library
 Name: nfs-utils-lib
 Version: 1.1.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 URL: http://www.citi.umich.edu/projects/nfsv4/linux/
 License: GPL
 
@@ -19,6 +19,7 @@
 Source1: http://www.citi.umich.edu/projects/nfsv4/linux/librpcsecgss/%{librpcsecgss}-%{rpcsecgssvers}.tar.gz
 
 Patch00: nfs-utils-lib-1.0.8-idmap.conf.patch
+Patch01: nfs-utils-lib-1.1.1-idmapd-domain-dns.patch
 
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -48,6 +49,7 @@
 mv %{librpcsecgss}-%{rpcsecgssvers} %{librpcsecgss}
 
 %patch00 -p1
+%patch01 -p1
 
 %build
 top=`pwd`
@@ -134,6 +136,10 @@
 %{_libdir}/libnfsidmap.a
 
 %changelog
+* Thu Jul 10 2008 Steve Dickson <steved at redhat.com> 1.1.1-5
+- Use the getdomainname() not the latter half of a 
+  hostname to determine the DNS domainname.
+
 * Fri Jun 27 2008 Steve Dickson <steved at redhat.com> 1.1.1-4
 - In idmapd.conf, commented out 'Domain' so DNS will be
   used to define the domainname. (bz 447237)




More information about the fedora-extras-commits mailing list