summaryrefslogtreecommitdiffstats
path: root/utils/mountd/mountd.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-03-19 11:41:21 +1100
committerNeil Brown <neilb@suse.de>2007-03-19 11:41:21 +1100
commit323d1c4d69b65ab36d951aca8473ceb02171ab08 (patch)
tree3de3df486887f235253646e927def626eee822f8 /utils/mountd/mountd.c
parent97ccd3d1b61f20cd681a82089e83c58f97438f1a (diff)
downloadnfs-utils-323d1c4d69b65ab36d951aca8473ceb02171ab08.tar.gz
nfs-utils-323d1c4d69b65ab36d951aca8473ceb02171ab08.tar.xz
nfs-utils-323d1c4d69b65ab36d951aca8473ceb02171ab08.zip
Allow exporting of a subfilesystem when 'crossmnt' is set.
If we are asked to export a filesystem which is not explicitly exported, but an ancestor is exported as 'crossmnt', export the filesystems with the same options as the ancestor. This is the first step to making 'crossmnt' effectively export a tree of filesystems.
Diffstat (limited to 'utils/mountd/mountd.c')
-rw-r--r--utils/mountd/mountd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index fc9a73c..04141d1 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -29,7 +29,7 @@
extern void cache_open(void);
extern struct nfs_fh_len *cache_get_filehandle(nfs_export *exp, int len, char *p);
-extern int cache_export(nfs_export *exp);
+extern int cache_export(nfs_export *exp, char *path);
extern void my_svc_run(void);
@@ -399,7 +399,7 @@ get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
p, strerror(errno));
*error = NFSERR_NOENT;
} else if (estb.st_dev != stb.st_dev
- /* && (!new_cache || !(exp->m_export.e_flags & NFSEXP_CROSSMOUNT)) */
+ && (!new_cache || !(exp->m_export.e_flags & NFSEXP_CROSSMOUNT))
) {
xlog(L_WARNING, "request to export directory %s below nearest filesystem %s",
p, exp->m_export.e_path);
@@ -418,7 +418,7 @@ get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
*/
struct nfs_fh_len *fh;
- if (cache_export(exp)) {
+ if (cache_export(exp, p)) {
*error = NFSERR_ACCES;
return NULL;
}