diff options
author | alfred <alfred@FreeBSD.org> | 1999-09-11 00:46:08 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 1999-09-11 00:46:08 +0000 |
commit | b9136a6115cbac97ab114f16b1aacf4eb20ad2c1 (patch) | |
tree | 783daf81f8570ef14570d4a5a6fc45f15ec1cbf5 /sys/miscfs/umapfs | |
parent | a9f7b5ee698afe56d1167bfa395f23b1fff1730c (diff) | |
download | FreeBSD-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/umapfs')
-rw-r--r-- | sys/miscfs/umapfs/umap_vfsops.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index 005862a..afa44f0 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -56,8 +56,9 @@ static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); static int umapfs_fhtovp __P((struct mount *mp, struct fid *fidp, - struct sockaddr *nam, struct vnode **vpp, - int *exflagsp, struct ucred **credanonp)); + struct vnode **vpp)); +static int umapfs_checkexp __P((struct mount *mp, struct sockaddr *nam, + int *extflagsp, struct ucred **credanonp)); static int umapfs_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); static int umapfs_quotactl __P((struct mount *mp, int cmd, uid_t uid, @@ -398,16 +399,25 @@ umapfs_vget(mp, ino, vpp) } static int -umapfs_fhtovp(mp, fidp, nam, vpp, exflagsp, credanonp) +umapfs_fhtovp(mp, fidp, vpp) struct mount *mp; struct fid *fidp; - struct sockaddr *nam; struct vnode **vpp; +{ + + return (VFS_FHTOVP(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, fidp, vpp)); +} + +static int +umapfs_checkexp(mp, nam, exflagsp, credanonp) + struct mount *mp; + struct sockaddr *nam; int *exflagsp; - struct ucred**credanonp; + struct ucred **credanonp; { - return (VFS_FHTOVP(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, fidp, nam, vpp, exflagsp,credanonp)); + return (VFS_CHECKEXP(MOUNTTOUMAPMOUNT(mp)->umapm_vfs, nam, + exflagsp, credanonp)); } static int @@ -428,6 +438,7 @@ static struct vfsops umap_vfsops = { umapfs_sync, umapfs_vget, umapfs_fhtovp, + umapfs_checkexp, umapfs_vptofh, umapfs_init, }; |