1 From a064fde8c2615333227de97d159bb338d4ac640d Mon Sep 17 00:00:00 2001
2 From: J. Bruce Fields <bfields@citi.umich.edu>
3 Date: Mon, 8 Mar 2010 14:59:01 -0500
4 Subject: [PATCH] mountd: fix path comparison for v4 crossmnt
6 This was obviously wrong, since path[strlen(path)] == '\0'
9 Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
10 Signed-off-by: Steve Dickson <steved@redhat.com>
12 utils/mountd/cache.c | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
15 diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
16 index b6c148f..45397db 100644
17 --- a/utils/mountd/cache.c
18 +++ b/utils/mountd/cache.c
19 @@ -619,7 +619,7 @@ static int is_subdirectory(char *subpath, char *path)
22 return strcmp(subpath, path) == 0
23 - || (strncmp(subpath, path, l) == 0 && path[l] == '/');
24 + || (strncmp(subpath, path, l) == 0 && subpath[l] == '/');
27 static int path_matches(nfs_export *exp, char *path)