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$
|
|
|
|
.\"
|
2020-06-27 21:37:48 +00:00
|
|
|
.Dd June 17, 2020
|
1999-09-11 00:57:20 +00:00
|
|
|
.Dt VFS_CHECKEXP 9
|
2010-04-14 19:08:06 +00:00
|
|
|
.Os
|
1999-09-11 00:57:20 +00:00
|
|
|
.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
|
2020-06-16 20:51:28 +00:00
|
|
|
.Fo VFS_CHECKEXP
|
|
|
|
.Fa "struct mount *mp"
|
|
|
|
.Fa "struct sockaddr *nam"
|
|
|
|
.Fa "uint64_t *exflagsp"
|
|
|
|
.Fa "struct ucred **credanonp"
|
|
|
|
.Fa "int *numsecflavor"
|
|
|
|
.Fa "int *secflavors"
|
2020-06-16 21:07:51 +00:00
|
|
|
.Fc
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh DESCRIPTION
|
2005-01-07 11:39:36 +00:00
|
|
|
The
|
|
|
|
.Fn VFS_CHECKEXP
|
|
|
|
macro 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
|
2005-01-07 11:39:36 +00:00
|
|
|
The arguments it expects are:
|
2020-06-27 21:37:48 +00:00
|
|
|
.Bl -tag -width numsecflavors
|
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.
|
2020-06-16 20:51:28 +00:00
|
|
|
.It Fa numsecflavors
|
|
|
|
Return value for the number of security flavors for this client.
|
|
|
|
.It Fa secflavors
|
|
|
|
Must be an array of size MAXSECFLAVORS, in which the security flavors
|
|
|
|
for this client are returned.
|
1999-09-11 00:57:20 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2005-01-07 11:39:36 +00:00
|
|
|
The
|
|
|
|
.Fn VFS_CHECKEXP
|
|
|
|
macro 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
|
2020-06-27 21:37:48 +00:00
|
|
|
It is called in the NFS server once a vnode for a file handle has been
|
|
|
|
acquired, in order to determine what access the client is allowed on
|
|
|
|
the file system the vnode resides in.
|
|
|
|
For NFSv4, it is also called whenever the lookup operation crosses a
|
|
|
|
server file system mount point, to update the access information.
|
1999-09-11 00:57:20 +00:00
|
|
|
.Pp
|
2020-06-27 21:37:48 +00:00
|
|
|
The operation is file system specific, but is normally handled by
|
|
|
|
the default ``vfs_stdcheckexp''.
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh RETURN VALUES
|
2020-06-16 20:51:28 +00:00
|
|
|
The export flags, anonymous credentials and security flavors specific to the
|
2020-06-27 21:37:48 +00:00
|
|
|
client
|
1999-09-11 00:57:20 +00:00
|
|
|
will be returned in
|
2020-06-16 20:51:28 +00:00
|
|
|
.Fa *exflagsp ,
|
|
|
|
.Fa *credanonp ,
|
|
|
|
.Fa *numsecflavors
|
1999-09-11 00:57:20 +00:00
|
|
|
and
|
2020-06-16 20:51:28 +00:00
|
|
|
.Fa *secflavors .
|
1999-09-11 00:57:20 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr VFS 9 ,
|
|
|
|
.Xr VFS_FHTOVP 9 ,
|
2014-12-21 10:57:42 +00:00
|
|
|
.Xr vnode 9 ,
|
|
|
|
.Xr VOP_VPTOFH 9
|
1999-09-11 00:57:20 +00:00
|
|
|
.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 .
|