diff options
author | NeilBrown <neilb@suse.de> | 2013-05-07 11:46:18 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2013-05-07 11:50:32 -0400 |
commit | 23d3980b6cfea4e9056d9b7b81e48b4fefc645e0 (patch) | |
tree | f881e2176cdfa690c194aed6176fc53c896d2cbc /support/include/nfs_paths.h | |
parent | 342446a4a624d4ee8254af859bb7f1de6d268679 (diff) | |
download | nfs-utils-23d3980b6cfea4e9056d9b7b81e48b4fefc645e0.tar.gz nfs-utils-23d3980b6cfea4e9056d9b7b81e48b4fefc645e0.tar.xz nfs-utils-23d3980b6cfea4e9056d9b7b81e48b4fefc645e0.zip |
mountd: Fix is_subdirectory again
The problem was that is_subdirectory() would also succeed if the two
directories were the same. This is needed for path_matches() which
needs to see if the child is same-or-descendant.
So this patch rearranges path_matches() to do the "are they the same"
test itself and only bother with is_subdirectory() if it they are not
the same.
So now is_subdirectory() can be strict, and so can be usable for
subexport(), which needs a strong 'in subdirectory - not the same' test.
Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include/nfs_paths.h')
0 files changed, 0 insertions, 0 deletions