exports: hide pseudo exports from clients
authorSteve Dickson <steved@redhat.com>
Tue, 1 Dec 2009 14:04:30 +0000 (09:04 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 13 Jan 2010 20:39:14 +0000 (15:39 -0500)
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>
utils/mountd/mountd.c

index 888fd8c..179ef17 100644 (file)
@@ -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;