summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-12-01 09:04:30 -0500
committerSteve Dickson <steved@redhat.com>2010-01-13 15:39:14 -0500
commitde108c531e29ba936a68a6efb99095ad6d6cec8f (patch)
tree3cde78ab26efd9634f0d9d4ff96632c77653b369
parent948cd2fb7983a4970132a97463b7928399bc51de (diff)
downloadnfs-utils-de108c531e29ba936a68a6efb99095ad6d6cec8f.tar.gz
nfs-utils-de108c531e29ba936a68a6efb99095ad6d6cec8f.tar.xz
nfs-utils-de108c531e29ba936a68a6efb99095ad6d6cec8f.zip
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 <steved@redhat.com>
-rw-r--r--utils/mountd/mountd.c4
1 files changed, 4 insertions, 0 deletions
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;