linux/fs/nfsd
J. Bruce Fields 51b2ee7d00 nfsd4: readdirplus shouldn't return parent of export
If you export a subdirectory of a filesystem, a READDIRPLUS on the root
of that export will return the filehandle of the parent with the ".."
entry.

The filehandle is optional, so let's just not return the filehandle for
".." if we're at the root of an export.

Note that once the client learns one filehandle outside of the export,
they can trivially access the rest of the export using further lookups.

However, it is also not very difficult to guess filehandles outside of
the export.  So exporting a subdirectory of a filesystem should
considered equivalent to providing access to the entire filesystem.  To
avoid confusion, we recommend only exporting entire filesystems.

Reported-by: Youjipeng <wangzhibei1999@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2021-01-12 08:54:14 -05:00
..
acl.h
auth.c
auth.h
blocklayout.c
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
export.c nfsd: allow filesystems to opt out of subtree checking 2020-12-09 09:39:38 -05:00
export.h
fault_inject.c
filecache.c \n 2020-12-17 10:56:27 -08:00
filecache.h
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
Kconfig
lockd.c
Makefile
netns.h
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c nfsd4: readdirplus shouldn't return parent of export 2021-01-12 08:54:14 -05:00
nfs4acl.c
nfs4callback.c
nfs4idmap.c
nfs4layouts.c
nfs4proc.c NFSD: Fix sparse warning in nfssvc.c 2020-12-18 12:28:23 -05:00
nfs4recover.c
nfs4state.c NFSD: Fix 5 seconds delay when doing inter server copy 2020-12-09 09:38:34 -05:00
nfs4xdr.c NFSD: Restore NFSv4 decoding's SAVEMEM functionality 2020-12-18 12:28:58 -05:00
nfscache.c
nfsctl.c
nfsd.h Revert "nfsd4: support change_attr_type attribute" 2020-12-09 09:39:38 -05:00
nfsfh.c nfsd: Record NFSv4 pre/post-op attributes as non-atomic 2020-12-09 09:39:38 -05:00
nfsfh.h nfsd: Record NFSv4 pre/post-op attributes as non-atomic 2020-12-09 09:39:38 -05:00
nfsproc.c
nfssvc.c NFSD: Fix sparse warning in nfssvc.c 2020-12-18 12:28:23 -05:00
nfsxdr.c
pnfs.h
state.h
stats.c
stats.h
trace.c
trace.h
vfs.c nfsd: Set PF_LOCAL_THROTTLE on local filesystems only 2020-12-09 09:39:38 -05:00
vfs.h
xdr.h
xdr3.h
xdr4.h NFSD: Fix sparse warning in nfssvc.c 2020-12-18 12:28:23 -05:00
xdr4cb.h