Blame SOURCES/nfs-utils-2.3.3-exportfs-man-labels.patch

d50f3a
commit 7d5dcd2358df55353eed94a0e84b77bb3597634e
d50f3a
Author: J. Bruce Fields <bfields@redhat.com>
d50f3a
Date:   Fri Mar 27 13:11:28 2020 -0400
d50f3a
d50f3a
    exports man page: warn about subdirectory exports
d50f3a
    
d50f3a
    Subdirectory exports have a number of problems which have been poorly
d50f3a
    documented.
d50f3a
    
d50f3a
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
d50f3a
    Signed-off-by: Steve Dickson <steved@redhat.com>
d50f3a
d50f3a
diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man
d50f3a
index e3a16f6b..1d171849 100644
d50f3a
--- a/utils/exportfs/exports.man
d50f3a
+++ b/utils/exportfs/exports.man
d50f3a
@@ -494,6 +494,33 @@ export entry for
d50f3a
 .B /home/joe
d50f3a
 in the example section below, which maps all requests to uid 150 (which
d50f3a
 is supposedly that of user joe).
d50f3a
+
d50f3a
+.SS Subdirectory Exports
d50f3a
+
d50f3a
+Normally you should only export only the root of a filesystem.  The NFS
d50f3a
+server will also allow you to export a subdirectory of a filesystem,
d50f3a
+however, this has drawbacks:
d50f3a
+
d50f3a
+First, it may be possible for a malicious user to access files on the
d50f3a
+filesystem outside of the exported subdirectory, by guessing filehandles
d50f3a
+for those other files.  The only way to prevent this is by using the
d50f3a
+.IR no_subtree_check
d50f3a
+option, which can cause other problems.
d50f3a
+
d50f3a
+Second, export options may not be enforced in the way that you would
d50f3a
+expect.  For example, the
d50f3a
+.IR security_label
d50f3a
+option will not work on subdirectory exports, and if nested subdirectory
d50f3a
+exports change the
d50f3a
+.IR security_label
d50f3a
+or
d50f3a
+.IR sec=
d50f3a
+options, NFSv4 clients will normally see only the options on the parent
d50f3a
+export.  Also, where security options differ, a malicious client may use
d50f3a
+filehandle-guessing attacks to access the files from one subdirectory
d50f3a
+using the options from another.
d50f3a
+
d50f3a
+
d50f3a
 .SS Extra Export Tables
d50f3a
 After reading 
d50f3a
 .I /etc/exports