diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-01-12 19:27:21 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-01-13 15:39:14 -0500 |
commit | b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b (patch) | |
tree | 7fee037306bed2223b6bf19d016d9ce2d1c76299 | |
parent | e0819debc9d1d322e06ca4047a125a4fd8176d13 (diff) | |
download | nfs-utils-b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b.tar.gz nfs-utils-b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b.tar.xz nfs-utils-b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b.zip |
mountd: better hiding of v4root exports from mountd clients
We've hidden v4root exports from get_exportlist (hence from the
showmount command), but not from other mountd operations--allowing
clients to attempt to mount exports when they should be getting an
immediate error.
Symptoms observed on a linux client were that a mount that previously
would have returned an error immediately now hung. This restores the
previous behavior.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r-- | utils/mountd/auth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index 41a57db..13eba70 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -182,6 +182,10 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller, return NULL; } } + if (exp->m_export.e_flags & NFSEXP_V4ROOT) { + *error = no_entry; + return NULL; + } if (!(exp->m_export.e_flags & NFSEXP_INSECURE_PORT) && ntohs(caller->sin_port) >= IPPORT_RESERVED) { *error = illegal_port; |