Message ID | 20190603171227.29148-2-trond.myklebust@hammerspace.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Incremental against [exports] rootdir patchset | expand |
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index d818c971bded..d616d526667e 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -400,7 +400,7 @@ static char *next_mnt(void **v, char *p) while ((me = getmntent(f)) != NULL && l > 1) { mnt_dir = nfsd_path_strip_root(me->mnt_dir); - if (strncmp(mnt_dir, p, l) == 0 && mnt_dir[l] != '/') + if (strncmp(mnt_dir, p, l) == 0 && mnt_dir[l] == '/') return mnt_dir; } endmntent(f);
We want to ensure that we compare the full name of the last component. Reported-by: "J. Bruce Fields" <bfields@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> --- utils/mountd/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)