From b1e28d50c2cf1d52c68c771921fd01f2af1c0a3b Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 12 Jan 2010 19:27:21 -0500 Subject: [PATCH] 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 --- utils/mountd/auth.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.2