Blame SOURCES/nfs-utils-1.3.0-exportfs-slashes.patch

851484
diff -up nfs-utils-1.3.0/utils/exportfs/exportfs.c.orig nfs-utils-1.3.0/utils/exportfs/exportfs.c
851484
--- nfs-utils-1.3.0/utils/exportfs/exportfs.c.orig	2016-05-03 10:50:17.226864000 -0400
851484
+++ nfs-utils-1.3.0/utils/exportfs/exportfs.c	2016-05-03 10:51:49.848199000 -0400
851484
@@ -402,8 +402,17 @@ unexportfs_parsed(char *hname, char *pat
851484
 			hname = ai->ai_canonname;
851484
 	}
851484
 
851484
+	/*
851484
+	 * It's possible the specified path ends with a '/'. But
851484
+	 * the entry from exportlist won't has the trailing '/',
851484
+	 * so need to deal with it.
851484
+	*/
851484
+	size_t nlen = strlen(path);
851484
+	while (path[nlen - 1] == '/')
851484
+		nlen--;
851484
+
851484
 	for (exp = exportlist[htype].p_head; exp; exp = exp->m_next) {
851484
-		if (path && strcmp(path, exp->m_export.e_path))
851484
+		if (path && strncmp(path, exp->m_export.e_path, nlen))
851484
 			continue;
851484
 		if (htype != exp->m_client->m_type)
851484
 			continue;