diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-12-22 13:02:08 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-01-13 15:39:14 -0500 |
commit | 0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043 (patch) | |
tree | 4de0806dad523b0ced68c894da5123c416ae7cb4 | |
parent | 9ec1b2c771ad0e16e0f031b017832d957c4bde56 (diff) | |
download | nfs-utils-0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043.tar.gz nfs-utils-0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043.tar.xz nfs-utils-0fe42a6e2cd7252c5c12a5f4edb4c27789b0c043.zip |
mountd: don't require mountpoint in crossmnt case
Currently,
mount --bind /path /path
where /path is a subdirectory of a crossmnt export, can cause client
hangs, since the kernel detects that as a mountpoint, but nfs-util's
is_mountpoint() function does not.
I don't see any sure-fire way to detect such mountpoints. But that's
OK: it's harmless to allow this upcall to succeed even when the
directory is not a mountpoint, so let's just remove this check.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r-- | utils/mountd/cache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index e340390..2468bc5 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -619,8 +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] == '/' - && is_mountpoint(path)); + || (strncmp(subpath, path, l) == 0 && path[l] == '/'); } static int path_matches(nfs_export *exp, char *path) |