@@ -1321,7 +1321,12 @@ static void nfsd_export(int f)
found = lookup_export(dom, path, ai);
if (found) {
- if (dump_to_cache(f, buf, sizeof(buf), dom, path, &found->m_export) < 0) {
+ if (found->m_export.e_mountpoint &&
+ !is_mountpoint(found->m_export.e_mountpoint[0]?
+ found->m_export.e_mountpoint:
+ found->m_export.e_path))
+ dump_to_cache(f, buf, sizeof(buf), dom, path, NULL);
+ else if (dump_to_cache(f, buf, sizeof(buf), dom, path, &found->m_export) < 0) {
xlog(L_WARNING,
"Cannot export %s, possibly unsupported filesystem"
" or fsid= required", path);
An export point with the "mountpoint" option should not be exported if it isn't a mount point. For NFSv3, this is handled primarily by failing the MOUNT request. For NFSv4, we must ensure a lookup from the pseduo-root fails too. This means nfsd_export must check for the 'mountpoint' option and handle it correctly. Signed-off-by: NeilBrown <neilb@suse.com> --- utils/mountd/cache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html