]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mountd: fix path comparison for v4 crossmnt (Closes: #578317)
authorBen Hutchings <ben@decadent.org.uk>
Thu, 26 Aug 2010 02:44:51 +0000 (03:44 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 26 Aug 2010 02:44:51 +0000 (03:44 +0100)
debian/changelog
debian/patches/15-mountd-fix-path-comparison-for-v4-crossmnt.patch [new file with mode: 0644]
debian/patches/series

index 56dc10b3e18f9fccb5d46c2ac4bced1eb4f1a0e6..31584ad45f25e0121b0e01be585d53897d2cdee6 100644 (file)
@@ -1,6 +1,6 @@
 nfs-utils (1:1.2.2-4) UNRELEASED; urgency=low
 
-  * 
+  * mountd: fix path comparison for v4 crossmnt (Closes: #578317)
 
  -- Ben Hutchings <ben@decadent.org.uk>  Thu, 26 Aug 2010 03:39:40 +0100
 
diff --git a/debian/patches/15-mountd-fix-path-comparison-for-v4-crossmnt.patch b/debian/patches/15-mountd-fix-path-comparison-for-v4-crossmnt.patch
new file mode 100644 (file)
index 0000000..5b58bc0
--- /dev/null
@@ -0,0 +1,30 @@
+From a064fde8c2615333227de97d159bb338d4ac640d Mon Sep 17 00:00:00 2001
+From: J. Bruce Fields <bfields@citi.umich.edu>
+Date: Mon, 8 Mar 2010 14:59:01 -0500
+Subject: [PATCH] mountd: fix path comparison for v4 crossmnt
+
+This was obviously wrong, since path[strlen(path)] == '\0'
+should always be true.
+
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ utils/mountd/cache.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index b6c148f..45397db 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -619,7 +619,7 @@ static int is_subdirectory(char *subpath, char *path)
+       int l = strlen(path);
+       return strcmp(subpath, path) == 0
+-              || (strncmp(subpath, path, l) == 0 && path[l] == '/');
++              || (strncmp(subpath, path, l) == 0 && subpath[l] == '/');
+ }
+ static int path_matches(nfs_export *exp, char *path)
+-- 
+1.7.1
+
index 05c49715cc91a79804a5577faca66b307cd7adbd..95912c3f59ea7546621b134ba4d29533bbb8f3da 100644 (file)
@@ -6,3 +6,4 @@
 12-svcgssd-document-n-option.patch
 13-preserve-explicit-port-2049.patch
 14-allow-address-without-name.patch
+15-mountd-fix-path-comparison-for-v4-crossmnt.patch