mountd: fix path comparison for v4 crossmnt From: J. Bruce Fields This was obviously wrong, since path[strlen(path)] == '\0' should always be true. NB: just as one usage of 'path' should be 'subpath', so also the other usage in is_mountpoint should be. bnc#648923 Signed-off-by: J. Bruce Fields Signed-off-by: Steve Dickson Acked-by: NeilBrown --- utils/mountd/cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- nfs-utils-1.2.1.orig/utils/mountd/cache.c +++ nfs-utils-1.2.1/utils/mountd/cache.c @@ -622,8 +622,8 @@ static int is_subdirectory(char *subpath int l = strlen(path); return strcmp(subpath, path) == 0 - || (strncmp(subpath, path, l) == 0 && path[l] == '/' - && is_mountpoint(path)); + || (strncmp(subpath, path, l) == 0 && subpath[l] == '/' + && is_mountpoint(subpath)); } static int path_matches(nfs_export *exp, char *path)