diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-03-08 14:59:01 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-03-08 14:59:01 -0500 |
commit | a064fde8c2615333227de97d159bb338d4ac640d (patch) | |
tree | badc219e073556630206a8a704fafa0ede1bd521 /utils/mountd/cache.c | |
parent | 6ca440c2661dccb05ae74ffb65817e9c30f05c8a (diff) | |
download | nfs-utils-a064fde8c2615333227de97d159bb338d4ac640d.tar.gz nfs-utils-a064fde8c2615333227de97d159bb338d4ac640d.tar.xz nfs-utils-a064fde8c2615333227de97d159bb338d4ac640d.zip |
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 <bfields@citi.umich.edu>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd/cache.c')
-rw-r--r-- | 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 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) |