summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_nfsiod.c
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/nfsclient/nfs_nfsiod.c
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/nfsclient/nfs_nfsiod.c')
-rw-r--r--sys/nfsclient/nfs_nfsiod.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 210dde6..054950b 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -120,49 +120,8 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, gatherdelay_v3, CTLFLAG_RW, &nfsrvw_procrastinate
/*
* NFS server system calls
- * getfh() lives here too, but maybe should move to kern/vfs_syscalls.c
*/
-/*
- * Get file handle system call
- */
-#ifndef _SYS_SYSPROTO_H_
-struct getfh_args {
- char *fname;
- fhandle_t *fhp;
-};
-#endif
-int
-getfh(p, uap)
- struct proc *p;
- register struct getfh_args *uap;
-{
- register struct vnode *vp;
- fhandle_t fh;
- int error;
- struct nameidata nd;
-
- /*
- * Must be super user
- */
- error = suser(p);
- if(error)
- return (error);
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->fname, p);
- error = namei(&nd);
- if (error)
- return (error);
- vp = nd.ni_vp;
- bzero((caddr_t)&fh, sizeof(fh));
- fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(vp, &fh.fh_fid);
- vput(vp);
- if (error)
- return (error);
- error = copyout((caddr_t)&fh, (caddr_t)uap->fhp, sizeof (fh));
- return (error);
-}
-
#endif /* NFS_NOSERVER */
/*
* Nfs server psuedo system call for the nfsd's
OpenPOWER on IntegriCloud