summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/nullfs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>1999-09-11 00:46:08 +0000
committeralfred <alfred@FreeBSD.org>1999-09-11 00:46:08 +0000
commitb9136a6115cbac97ab114f16b1aacf4eb20ad2c1 (patch)
tree783daf81f8570ef14570d4a5a6fc45f15ec1cbf5 /sys/miscfs/nullfs
parenta9f7b5ee698afe56d1167bfa395f23b1fff1730c (diff)
downloadFreeBSD-src-b9136a6115cbac97ab114f16b1aacf4eb20ad2c1.zip
FreeBSD-src-b9136a6115cbac97ab114f16b1aacf4eb20ad2c1.tar.gz
Seperate the export check in VFS_FHTOVP, exports are now checked via
VFS_CHECKEXP. Add fh(open|stat|stafs) syscalls to allow userland to query filesystems based on (network) filehandle. Obtained from: NetBSD
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r--sys/miscfs/nullfs/null_vfsops.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c
index 730eb80..06e1be0 100644
--- a/sys/miscfs/nullfs/null_vfsops.c
+++ b/sys/miscfs/nullfs/null_vfsops.c
@@ -57,8 +57,9 @@
static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure");
static int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp,
- struct sockaddr *nam, struct vnode **vpp,
- int *exflagsp, struct ucred **credanonp));
+ struct vnode **vpp));
+static int nullfs_checkexp __P((struct mount *mp, struct sockaddr *nam,
+ int *extflagsp, struct ucred **credanonp));
static int nullfs_mount __P((struct mount *mp, char *path, caddr_t data,
struct nameidata *ndp, struct proc *p));
static int nullfs_quotactl __P((struct mount *mp, int cmd, uid_t uid,
@@ -385,17 +386,25 @@ nullfs_vget(mp, ino, vpp)
}
static int
-nullfs_fhtovp(mp, fidp, nam, vpp, exflagsp, credanonp)
+nullfs_fhtovp(mp, fidp, vpp)
struct mount *mp;
struct fid *fidp;
- struct sockaddr *nam;
struct vnode **vpp;
- int *exflagsp;
- struct ucred**credanonp;
{
- return VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, nam,
- vpp, exflagsp, credanonp);
+ return VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, vpp);
+}
+
+static int
+nullfs_checkexp(mp, nam, extflagsp, credanonp)
+ struct mount *mp;
+ struct sockaddr *nam;
+ int *extflagsp;
+ struct ucred **credanonp;
+{
+
+ return VFS_CHECKEXP(MOUNTTONULLMOUNT(mp)->nullm_vfs, nam,
+ extflagsp, credanonp);
}
static int
@@ -416,6 +425,7 @@ static struct vfsops null_vfsops = {
nullfs_sync,
nullfs_vget,
nullfs_fhtovp,
+ nullfs_checkexp,
nullfs_vptofh,
nullfs_init,
};
OpenPOWER on IntegriCloud