[packages/nfs-utils] - updated to 2.5.1 - updated heimdal patch

qboosh qboosh at pld-linux.org
Sat Aug 22 19:23:23 CEST 2020


commit 21904062fa7e413daffb3141687dd6adb54458e6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Aug 22 19:25:50 2020 +0200

    - updated to 2.5.1
    - updated heimdal patch

 nfs-utils-heimdal.patch | 112 +++++++++++++++++++++++++++++++++++++++++++++---
 nfs-utils-x32.patch     |  44 -------------------
 nfs-utils.spec          |  15 ++++---
 3 files changed, 115 insertions(+), 56 deletions(-)
---
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 03c6ce5..64fdbe4 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -10,12 +10,12 @@ Summary(pt_BR.UTF-8):	Os utilitários para o cliente e servidor NFS do Linux
 Summary(ru.UTF-8):	Утилиты для NFS и демоны поддержки для NFS-сервера ядра
 Summary(uk.UTF-8):	Утиліти для NFS та демони підтримки для NFS-сервера ядра
 Name:		nfs-utils
-Version:	2.4.3
-Release:	2
+Version:	2.5.1
+Release:	1
 License:	GPL v2
 Group:		Networking/Daemons
 Source0:	https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	06020c76f531ed97f3145514901e0e7c
+# Source0-md5:	d14294d5efcd9aada28f4dab871a44a6
 #Source1:	ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz
 Source1:	nfs.doc.tar.gz
 # Source1-md5:	ae7db9c61c5ad04f83bb99e5caed73da
@@ -363,7 +363,7 @@ ln -sf /bin/true $RPM_BUILD_ROOT/sbin/fsck.nfs
 cp -a nfs html
 
 # make python dep optional
-chmod a-x $RPM_BUILD_ROOT%{_sbindir}/{mountstats,nfsiostat}
+chmod a-x $RPM_BUILD_ROOT%{_sbindir}/{mountstats,nfsdclddb,nfsdclnts,nfsiostat}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -485,9 +485,10 @@ fi
 %attr(755,root,root) /sbin/nfsdcltrack
 %attr(755,root,root) /sbin/rpcdebug
 %attr(755,root,root) /sbin/fsck.nfs
-%attr(755,root,root) %{_sbindir}/clddb-tool
 %attr(755,root,root) %{_sbindir}/exportfs
 %attr(755,root,root) %{_sbindir}/nfsdcld
+%attr(755,root,root) %{_sbindir}/nfsdclddb
+%attr(755,root,root) %{_sbindir}/nfsdclnts
 %attr(755,root,root) %{_sbindir}/rpc.mountd
 %attr(755,root,root) %{_sbindir}/rpc.nfsd
 %attr(755,root,root) %{_sbindir}/rpc.svcgssd
@@ -508,11 +509,12 @@ fi
 %{_mandir}/man5/nfs.conf.5*
 %{_mandir}/man7/nfsd.7*
 %{_mandir}/man7/nfs.systemd.7*
-%{_mandir}/man8/clddb-tool.8*
 %{_mandir}/man8/exportfs.8*
 %{_mandir}/man8/mountd.8*
 %{_mandir}/man8/nfsd.8*
 %{_mandir}/man8/nfsdcld.8*
+%{_mandir}/man8/nfsdclddb.8*
+%{_mandir}/man8/nfsdclnts.8*
 %{_mandir}/man8/nfsdcltrack.8*
 %{_mandir}/man8/nfsstat.8*
 %{_mandir}/man8/rpc.mountd.8*
@@ -605,6 +607,7 @@ fi
 %attr(755,root,root) %ghost /%{_lib}/libnfsidmap.so.1
 %dir /%{_lib}/libnfsidmap
 %attr(755,root,root) /%{_lib}/libnfsidmap/nsswitch.so
+%attr(755,root,root) /%{_lib}/libnfsidmap/regex.so
 %attr(755,root,root) /%{_lib}/libnfsidmap/static.so
 # -plugin-ldap subpackage?
 %attr(755,root,root) /%{_lib}/libnfsidmap/umich_ldap.so
diff --git a/nfs-utils-heimdal.patch b/nfs-utils-heimdal.patch
index d6debaa..f3b3850 100644
--- a/nfs-utils-heimdal.patch
+++ b/nfs-utils-heimdal.patch
@@ -13,9 +13,75 @@
           AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries])
           KRBDIR="$dir"
           gssapi_lib=gssapi
---- nfs-utils-2.3.2/utils/gssd/krb5_util.c.orig	2018-05-22 20:33:01.000000000 +0200
-+++ nfs-utils-2.3.2/utils/gssd/krb5_util.c	2018-08-28 17:25:00.834953411 +0200
-@@ -966,9 +966,37 @@
+--- nfs-utils-2.5.1/utils/gssd/krb5_util.c.orig	2020-06-18 19:10:06.000000000 +0200
++++ nfs-utils-2.5.1/utils/gssd/krb5_util.c	2020-08-22 18:47:27.393014417 +0200
+@@ -484,7 +484,7 @@
+ 	if (ccache)
+ 		krb5_cc_close(context, ccache);
+ 	krb5_free_cred_contents(context, &my_creds);
+-	krb5_free_string(context, k5err);
++	free(k5err);
+ 	return (code);
+ }
+ 
+@@ -723,7 +723,7 @@
+ 				 "we failed to unparse principal name: %s\n",
+ 				 k5err);
+ 			k5_free_kt_entry(context, kte);
+-			krb5_free_string(context, k5err);
++			free(k5err);
+ 			k5err = NULL;
+ 			continue;
+ 		}
+@@ -770,7 +770,7 @@
+ 	if (retval < 0)
+ 		retval = 0;
+   out:
+-	krb5_free_string(context, k5err);
++	free(k5err);
+ 	return retval;
+ }
+ 
+@@ -836,7 +836,11 @@
+ 	        myhostad[i+1] = 0;
+ 	}
+ 	if (adhostoverride)
++#ifdef HAVE_HEIMDAL
++		free(adhostoverride);
++#else
+ 		krb5_free_string(context, adhostoverride);
++#endif
+ 
+ 	if (!srchost) {
+ 		retval = get_full_hostname(myhostname, myhostname, sizeof(myhostname));
+@@ -927,7 +931,7 @@
+ 				k5err = gssd_k5_err_msg(context, code);
+ 				printerr(1, "%s while building principal for '%s'\n",
+ 					 k5err, spn);
+-				krb5_free_string(context, k5err);
++				free(k5err);
+ 				k5err = NULL;
+ 				continue;
+ 			}
+@@ -937,7 +941,7 @@
+ 				k5err = gssd_k5_err_msg(context, code);
+ 				printerr(3, "%s while getting keytab entry for '%s'\n",
+ 					 k5err, spn);
+-				krb5_free_string(context, k5err);
++				free(k5err);
+ 				k5err = NULL;
+ 				/*
+ 				 * We tried the active directory machine account
+@@ -986,7 +990,7 @@
+ 		k5_free_default_realm(context, default_realm);
+ 	if (realmnames)
+ 		krb5_free_host_realm(context, realmnames);
+-	krb5_free_string(context, k5err);
++	free(k5err);
+ 	return retval;
+ }
+ 
+@@ -1003,9 +1007,37 @@
  {
  	krb5_error_code ret;
  	krb5_creds creds;
@@ -54,7 +120,7 @@
  	ret = krb5_cc_start_seq_get(context, ccache, &cur);
  	if (ret) 
  		return 0;
-@@ -988,6 +1016,7 @@
+@@ -1025,6 +1057,7 @@
  		krb5_free_cred_contents(context, &creds);
  	}
  	krb5_cc_end_seq_get(context, ccache, &cur);
@@ -62,7 +128,7 @@
  
  	return found;
  }
-@@ -1034,6 +1063,9 @@
+@@ -1071,6 +1104,9 @@
  	}
  	krb5_free_principal(context, principal);
  err_princ:
@@ -72,7 +138,41 @@
  	krb5_cc_set_flags(context, ccache,  KRB5_TC_OPENCLOSE);
  	krb5_cc_close(context, ccache);
  err_cache:
-@@ -1323,7 +1355,7 @@
+@@ -1249,7 +1285,7 @@
+ 			printerr(0, "WARNING: %s while resolving credential "
+ 				    "cache '%s' for destruction\n", k5err,
+ 				    ple->ccname);
+-			krb5_free_string(context, k5err);
++			free(k5err);
+ 			k5err = NULL;
+ 			continue;
+ 		}
+@@ -1258,13 +1294,13 @@
+ 			k5err = gssd_k5_err_msg(context, code);
+ 			printerr(0, "WARNING: %s while destroying credential "
+ 				    "cache '%s'\n", k5err, ple->ccname);
+-			krb5_free_string(context, k5err);
++			free(k5err);
+ 			k5err = NULL;
+ 		}
+ 	}
+ 	krb5_free_context(context);
+   out:
+-	krb5_free_string(context, k5err);
++	free(k5err);
+ }
+ 
+ /*
+@@ -1347,7 +1383,7 @@
+ out_free_context:
+ 	krb5_free_context(context);
+ out:
+-	krb5_free_string(context, k5err);
++	free(k5err);
+ 	return retval;
+ }
+ 
+@@ -1369,7 +1405,7 @@
  #endif
  	if (msg != NULL)
  		return msg;
diff --git a/nfs-utils-x32.patch b/nfs-utils-x32.patch
index 789a5a7..b983064 100644
--- a/nfs-utils-x32.patch
+++ b/nfs-utils-x32.patch
@@ -20,50 +20,6 @@
                     -f $dir/lib64/libroken.so -o \
                     -f $dir/lib/libroken.so \) ; then
           K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($(2),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }'`
---- nfs-utils-2.3.3/support/nfs/cacheio.c.orig	2018-09-06 20:09:08.000000000 +0200
-+++ nfs-utils-2.3.3/support/nfs/cacheio.c	2018-12-09 20:39:32.658337475 +0100
-@@ -234,7 +234,7 @@
- 	    stb.st_mtime > now)
- 		stb.st_mtime = time(0);
- 	
--	sprintf(stime, "%ld\n", stb.st_mtime);
-+	sprintf(stime, "%lld\n", (long long)stb.st_mtime);
- 	for (c=0; cachelist[c]; c++) {
- 		int fd;
- 		sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]);
---- nfs-utils-2.3.3/utils/idmapd/idmapd.c.orig	2018-09-06 20:09:08.000000000 +0200
-+++ nfs-utils-2.3.3/utils/idmapd/idmapd.c	2018-12-09 20:40:55.019279956 +0100
-@@ -171,7 +171,7 @@
- 	int fd;
- 	char stime[32];
- 
--	sprintf(stime, "%ld\n", now);
-+	sprintf(stime, "%lld\n", (long long)now);
- 	fd = open(path, O_RDWR);
- 	if (fd == -1)
- 		return -1;
-@@ -612,8 +612,8 @@
- 		/* Name */
- 		addfield(&bp, &bsiz, im.im_name);
- 		/* expiry */
--		snprintf(buf1, sizeof(buf1), "%lu",
--			 time(NULL) + cache_entry_expiration);
-+		snprintf(buf1, sizeof(buf1), "%llu",
-+			 (unsigned long long)(time(NULL) + cache_entry_expiration));
- 		addfield(&bp, &bsiz, buf1);
- 		/* Note that we don't want to write the id if the mapping
- 		 * failed; instead, by leaving it off, we write a negative
-@@ -640,8 +640,8 @@
- 		snprintf(buf1, sizeof(buf1), "%u", im.im_id);
- 		addfield(&bp, &bsiz, buf1);
- 		/* expiry */
--		snprintf(buf1, sizeof(buf1), "%lu",
--			 time(NULL) + cache_entry_expiration);
-+		snprintf(buf1, sizeof(buf1), "%llu",
-+			 (unsigned long long)(time(NULL) + cache_entry_expiration));
- 		addfield(&bp, &bsiz, buf1);
- 		/* Note we're ignoring the status field in this case; we'll
- 		 * just map to nobody instead. */
 --- nfs-utils-2.3.3/utils/nfsdcltrack/sqlite.c.orig	2018-09-06 20:09:08.000000000 +0200
 +++ nfs-utils-2.3.3/utils/nfsdcltrack/sqlite.c	2018-12-09 20:41:52.172247084 +0100
 @@ -542,8 +542,8 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nfs-utils.git/commitdiff/21904062fa7e413daffb3141687dd6adb54458e6



More information about the pld-cvs-commit mailing list