]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/patches/15-mountd-fix-path-comparison-for-v4-crossmnt.patch
Merge commit 'upstream/1.2.3'
[nfs-utils.git] / debian / patches / 15-mountd-fix-path-comparison-for-v4-crossmnt.patch
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
5
6 This was obviously wrong, since path[strlen(path)] == '\0'
7 should always be true.
8
9 Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
10 Signed-off-by: Steve Dickson <steved@redhat.com>
11 ---
12  utils/mountd/cache.c |    2 +-
13  1 files changed, 1 insertions(+), 1 deletions(-)
14
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)
20         int l = strlen(path);
21  
22         return strcmp(subpath, path) == 0
23 -               || (strncmp(subpath, path, l) == 0 && path[l] == '/');
24 +               || (strncmp(subpath, path, l) == 0 && subpath[l] == '/');
25  }
26  
27  static int path_matches(nfs_export *exp, char *path)
28 -- 
29 1.7.1
30