From: J. Bruce Fields Date: Mon, 8 Mar 2010 19:59:01 +0000 (-0500) Subject: mountd: fix path comparison for v4 crossmnt X-Git-Tag: nfs-utils-1-2-3-rc1~8 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=a064fde8c2615333227de97d159bb338d4ac640d;p=nfs-utils.git 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 --- 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)