From: J. Bruce Fields Date: Wed, 13 Jan 2010 00:27:21 +0000 (-0500) Subject: mountd: better hiding of v4root exports from mountd clients X-Git-Tag: nfs-utils-1-2-2-rc6~1 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b 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 --- 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;