summaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_vfsops.c
diff options
context:
space:
mode:
authorassar <assar@cvs.openbsd.org>2000-02-07 04:57:20 +0000
committerassar <assar@cvs.openbsd.org>2000-02-07 04:57:20 +0000
commit6f7e6bffc9d5d686eb1bdf9b027266f64db28754 (patch)
tree1b456f9a4be5902545c6b6f0805e173ab4dc3195 /sys/msdosfs/msdosfs_vfsops.c
parent3510e94919e26ce8c81fffcb220fc932c7d4aeb3 (diff)
update to use new checkexp vfs operation
Diffstat (limited to 'sys/msdosfs/msdosfs_vfsops.c')
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c43
1 files changed, 29 insertions, 14 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index fdc71dc7f12..efcf50c6c1b 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.18 1999/05/31 17:34:51 millert Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.19 2000/02/07 04:57:17 assar Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -77,9 +77,10 @@ int msdosfs_unmount __P((struct mount *, int, struct proc *));
int msdosfs_root __P((struct mount *, struct vnode **));
int msdosfs_statfs __P((struct mount *, struct statfs *, struct proc *));
int msdosfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
-int msdosfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
- struct vnode **, int *, struct ucred **));
+int msdosfs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
int msdosfs_vptofh __P((struct vnode *, struct fid *));
+int msdosfs_check_export __P((struct mount *mp, struct mbuf *nam,
+ int *extflagsp, struct ucred **credanonp));
int msdosfs_mountfs __P((struct vnode *, struct mount *, struct proc *,
struct msdosfs_args *));
@@ -776,31 +777,22 @@ loop:
}
int
-msdosfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
+msdosfs_fhtovp(mp, fhp, vpp)
struct mount *mp;
struct fid *fhp;
- struct mbuf *nam;
struct vnode **vpp;
- int *exflagsp;
- struct ucred **credanonp;
{
struct msdosfsmount *pmp = VFSTOMSDOSFS(mp);
struct defid *defhp = (struct defid *) fhp;
struct denode *dep;
- struct netcred *np;
int error;
- np = vfs_export_lookup(mp, &pmp->pm_export, nam);
- if (np == NULL)
- return (EACCES);
error = deget(pmp, defhp->defid_dirclust, defhp->defid_dirofs, &dep);
if (error) {
*vpp = NULLVP;
return (error);
}
*vpp = DETOV(dep);
- *exflagsp = np->netc_exflags;
- *credanonp = &np->netc_anon;
return (0);
}
@@ -821,6 +813,28 @@ msdosfs_vptofh(vp, fhp)
return (0);
}
+int
+msdosfs_check_export(mp, nam, exflagsp, credanonp)
+ register struct mount *mp;
+ struct mbuf *nam;
+ int *exflagsp;
+ struct ucred **credanonp;
+{
+ register struct netcred *np;
+ register struct msdosfsmount *pmp = VFSTOMSDOSFS(mp);
+
+ /*
+ * Get the export permission structure for this <mp, client> tuple.
+ */
+ np = vfs_export_lookup(mp, &pmp->pm_export, nam);
+ if (np == NULL)
+ return (EACCES);
+
+ *exflagsp = np->netc_exflags;
+ *credanonp = &np->netc_anon;
+ return (0);
+}
+
#define msdosfs_vget ((int (*) __P((struct mount *, ino_t, struct vnode **))) \
eopnotsupp)
@@ -842,5 +856,6 @@ struct vfsops msdosfs_vfsops = {
msdosfs_fhtovp,
msdosfs_vptofh,
msdosfs_init,
- msdosfs_sysctl
+ msdosfs_sysctl,
+ msdosfs_check_export
};