summaryrefslogtreecommitdiffstats
path: root/sys/gnu
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/gnu
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/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c12
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c12
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index 1bf97d5..7da44f9 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -37,6 +37,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
+ * $FreeBSD$
*/
#include "opt_quota.h"
@@ -65,8 +66,7 @@
#include <gnu/ext2fs/ext2_fs.h>
#include <gnu/ext2fs/ext2_fs_sb.h>
-static int ext2_fhtovp __P((struct mount *, struct fid *, struct sockaddr *,
- struct vnode **, int *, struct ucred **));
+static int ext2_fhtovp __P((struct mount *, struct fid *, struct vnode **));
static int ext2_flushfiles __P((struct mount *mp, int flags, struct proc *p));
static int ext2_mount __P((struct mount *,
char *, caddr_t, struct nameidata *, struct proc *));
@@ -92,6 +92,7 @@ static struct vfsops ext2fs_vfsops = {
ext2_sync,
ext2_vget,
ext2_fhtovp,
+ ufs_check_export,
ext2_vptofh,
ext2_init,
};
@@ -1113,13 +1114,10 @@ printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
* those rights via. exflagsp and credanonp
*/
static int
-ext2_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
+ext2_fhtovp(mp, fhp, vpp)
register struct mount *mp;
struct fid *fhp;
- struct sockaddr *nam;
struct vnode **vpp;
- int *exflagsp;
- struct ucred **credanonp;
{
register struct ufid *ufhp;
struct ext2_sb_info *fs;
@@ -1129,7 +1127,7 @@ ext2_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
if (ufhp->ufid_ino < ROOTINO ||
ufhp->ufid_ino >= fs->s_groups_count * fs->s_es->s_inodes_per_group)
return (ESTALE);
- return (ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp));
+ return (ufs_fhtovp(mp, ufhp, vpp));
}
/*
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index 1bf97d5..7da44f9 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -37,6 +37,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94
+ * $FreeBSD$
*/
#include "opt_quota.h"
@@ -65,8 +66,7 @@
#include <gnu/ext2fs/ext2_fs.h>
#include <gnu/ext2fs/ext2_fs_sb.h>
-static int ext2_fhtovp __P((struct mount *, struct fid *, struct sockaddr *,
- struct vnode **, int *, struct ucred **));
+static int ext2_fhtovp __P((struct mount *, struct fid *, struct vnode **));
static int ext2_flushfiles __P((struct mount *mp, int flags, struct proc *p));
static int ext2_mount __P((struct mount *,
char *, caddr_t, struct nameidata *, struct proc *));
@@ -92,6 +92,7 @@ static struct vfsops ext2fs_vfsops = {
ext2_sync,
ext2_vget,
ext2_fhtovp,
+ ufs_check_export,
ext2_vptofh,
ext2_init,
};
@@ -1113,13 +1114,10 @@ printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino)));
* those rights via. exflagsp and credanonp
*/
static int
-ext2_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
+ext2_fhtovp(mp, fhp, vpp)
register struct mount *mp;
struct fid *fhp;
- struct sockaddr *nam;
struct vnode **vpp;
- int *exflagsp;
- struct ucred **credanonp;
{
register struct ufid *ufhp;
struct ext2_sb_info *fs;
@@ -1129,7 +1127,7 @@ ext2_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
if (ufhp->ufid_ino < ROOTINO ||
ufhp->ufid_ino >= fs->s_groups_count * fs->s_es->s_inodes_per_group)
return (ESTALE);
- return (ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp));
+ return (ufs_fhtovp(mp, ufhp, vpp));
}
/*
OpenPOWER on IntegriCloud