1999-09-11 00:57:20 +00:00
|
|
|
.\"
|
1999-09-11 21:00:03 +00:00
|
|
|
.\" Copyright (c) 1999 Alfred Perlstein
|
1999-09-11 00:57:20 +00:00
|
|
|
.\"
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This program is free software.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
1999-09-11 21:00:03 +00:00
|
|
|
.\" modification, are permitted provided that the following condition
|
|
|
|
.\" is met:
|
|
|
|
.\" Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this condition and the following disclaimer.
|
1999-09-11 00:57:20 +00:00
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
1999-09-11 21:00:03 +00:00
|
|
|
.Dd September 10, 1999
|
1999-09-11 00:57:20 +00:00
|
|
|
.Os
|
|
|
|
.Dt VFS_CHECKEXP 9
|
|
|
|
.Sh NAME
|
|
|
|
.Nm VFS_CHECKEXP
|
2002-12-12 17:26:04 +00:00
|
|
|
.Nd check if a file system is exported to a client
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-10-01 16:09:29 +00:00
|
|
|
.In sys/param.h
|
|
|
|
.In sys/mount.h
|
1999-09-11 00:57:20 +00:00
|
|
|
.Ft int
|
2001-02-15 12:41:44 +00:00
|
|
|
.Fn VFS_CHECKEXP "struct mount *mp" "struct sockaddr *nam" "int *exflagsp" "struct ucred **credanonp"
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh DESCRIPTION
|
2001-07-14 19:41:16 +00:00
|
|
|
This is used by the NFS server to check if a mount point is exported
|
1999-09-11 21:00:03 +00:00
|
|
|
to a client.
|
1999-09-11 00:57:20 +00:00
|
|
|
.Pp
|
|
|
|
Its arguments are:
|
|
|
|
.Bl -tag -width credanonp
|
2003-05-31 14:07:25 +00:00
|
|
|
.It Fa mp
|
1999-09-11 00:57:20 +00:00
|
|
|
The mount point to be checked.
|
2003-05-31 14:07:25 +00:00
|
|
|
.It Fa nam
|
1999-09-11 00:57:20 +00:00
|
|
|
An mbuf containing the network address of the client.
|
2003-05-31 14:07:25 +00:00
|
|
|
.It Fa exflagsp
|
1999-09-11 00:57:20 +00:00
|
|
|
Return parameter for the export flags for this client.
|
2003-05-31 14:07:25 +00:00
|
|
|
.It Fa credanonp
|
1999-09-11 00:57:20 +00:00
|
|
|
Return parameter for the anonymous credentials for this client.
|
|
|
|
.El
|
|
|
|
.Pp
|
2002-12-12 17:26:04 +00:00
|
|
|
This should be called on a file system's mount structure to determine if it
|
2001-07-14 19:41:16 +00:00
|
|
|
is exported to a client whose address is contained in
|
1999-09-11 00:57:20 +00:00
|
|
|
.Fa nam .
|
|
|
|
.Pp
|
|
|
|
It is generally called before
|
|
|
|
.Xr VFS_FHTOVP 9
|
2002-12-12 17:26:04 +00:00
|
|
|
to validate that a client has access to the file system.
|
1999-09-11 00:57:20 +00:00
|
|
|
.Pp
|
2002-12-12 17:26:04 +00:00
|
|
|
The file system should call
|
1999-09-11 00:57:20 +00:00
|
|
|
.Xr vfs_export_lookup 9
|
|
|
|
with the address of an appropriate
|
2003-05-31 14:07:25 +00:00
|
|
|
.Vt netexport
|
1999-09-11 00:57:20 +00:00
|
|
|
structure and the address of the client,
|
|
|
|
.Fa nam ,
|
2002-12-12 17:26:04 +00:00
|
|
|
to verify that the client can access this file system.
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh RETURN VALUES
|
1999-09-11 21:00:03 +00:00
|
|
|
The export flags and anonymous credentials specific to the client (returned
|
|
|
|
by
|
|
|
|
.Xr vfs_export_lookup 9 )
|
1999-09-11 00:57:20 +00:00
|
|
|
will be returned in
|
|
|
|
.Fa *exflagsp
|
|
|
|
and
|
|
|
|
.Fa *credanonp .
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr VFS 9 ,
|
|
|
|
.Xr VFS_FHTOVP 9 ,
|
|
|
|
.Xr VFS_VPTOFH 9 ,
|
|
|
|
.Xr vnode 9
|
|
|
|
.Sh AUTHORS
|
2003-10-23 06:24:55 +00:00
|
|
|
This manual page was written by
|
1999-09-11 00:57:20 +00:00
|
|
|
.An Alfred Perlstein .
|