mountd: fix path comparison for v4 crossmnt From: J. Bruce Fields 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 721d550..cf094f6 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -622,7 +622,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] == '/' && is_mountpoint(path)); }