From: Steve Dickson Date: Tue, 1 Dec 2009 14:04:30 +0000 (-0500) Subject: exports: hide pseudo exports from clients X-Git-Tag: nfs-utils-1-2-2-rc6~14 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=de108c531e29ba936a68a6efb99095ad6d6cec8f;p=nfs-utils.git exports: hide pseudo exports from clients Don't show pseudo exports when clients ask to see what is exported via the showmount mount command. Signed-off-by: Steve Dickson --- diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 888fd8c..179ef17 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -540,6 +540,10 @@ get_exportlist(void) for (i = 0; i < MCL_MAXTYPES; i++) { for (exp = exportlist[i].p_head; exp; exp = exp->m_next) { + /* Don't show pseudo exports */ + if (exp->m_export.e_flags & NFSEXP_V4ROOT) + continue; + for (e = elist; e != NULL; e = e->ex_next) { if (!strcmp(exp->m_export.e_path, e->ex_dir)) break;