From: Ben Hutchings Date: Thu, 26 Aug 2010 02:44:51 +0000 (+0100) Subject: mountd: fix path comparison for v4 crossmnt (Closes: #578317) X-Git-Tag: debian/1%1.2.2-4~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=066dc7029f91e3dd755e05553eae2fb05f9b85da;p=nfs-utils.git mountd: fix path comparison for v4 crossmnt (Closes: #578317) --- diff --git a/debian/changelog b/debian/changelog index 56dc10b..31584ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 index 0000000..5b58bc0 --- /dev/null +++ b/debian/patches/15-mountd-fix-path-comparison-for-v4-crossmnt.patch @@ -0,0 +1,30 @@ +From a064fde8c2615333227de97d159bb338d4ac640d Mon Sep 17 00:00:00 2001 +From: J. Bruce Fields +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 +Signed-off-by: Steve Dickson +--- + 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 + diff --git a/debian/patches/series b/debian/patches/series index 05c4971..95912c3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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