1.\" 2.\" Copyright (c) 1999 Alfred Perlstein 3.\" 4.\" All rights reserved. 5.\" 6.\" This program is free software. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following condition 10.\" is met: 11.\" Redistributions of source code must retain the above copyright 12.\" notice, this condition and the following disclaimer. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" 25.Dd June 17, 2020 26.Dt VFS_CHECKEXP 9 27.Os 28.Sh NAME 29.Nm VFS_CHECKEXP 30.Nd check if a file system is exported to a client 31.Sh SYNOPSIS 32.In sys/param.h 33.In sys/mount.h 34.Ft int 35.Fo VFS_CHECKEXP 36.Fa "struct mount *mp" 37.Fa "struct sockaddr *nam" 38.Fa "uint64_t *exflagsp" 39.Fa "struct ucred **credanonp" 40.Fa "int *numsecflavor" 41.Fa "int *secflavors" 42.Fc 43.Sh DESCRIPTION 44The 45.Fn VFS_CHECKEXP 46macro is used by the NFS server to check if a mount point is exported 47to a client. 48.Pp 49The arguments it expects are: 50.Bl -tag -width numsecflavors 51.It Fa mp 52The mount point to be checked. 53.It Fa nam 54An mbuf containing the network address of the client. 55.It Fa exflagsp 56Return parameter for the export flags for this client. 57.It Fa credanonp 58Return parameter for the anonymous credentials for this client. 59.It Fa numsecflavors 60Return value for the number of security flavors for this client. 61.It Fa secflavors 62Must be an array of size MAXSECFLAVORS, in which the security flavors 63for this client are returned. 64.El 65.Pp 66The 67.Fn VFS_CHECKEXP 68macro should be called on a file system's mount structure to determine if it 69is exported to a client whose address is contained in 70.Fa nam . 71.Pp 72It is called in the NFS server once a vnode for a file handle has been 73acquired, in order to determine what access the client is allowed on 74the file system the vnode resides in. 75For NFSv4, it is also called whenever the lookup operation crosses a 76server file system mount point, to update the access information. 77.Pp 78The operation is file system specific, but is normally handled by 79the default ``vfs_stdcheckexp''. 80.Sh RETURN VALUES 81The export flags, anonymous credentials and security flavors specific to the 82client 83will be returned in 84.Fa *exflagsp , 85.Fa *credanonp , 86.Fa *numsecflavors 87and 88.Fa *secflavors . 89.Sh SEE ALSO 90.Xr VFS 9 , 91.Xr VFS_FHTOVP 9 , 92.Xr vnode 9 , 93.Xr VOP_VPTOFH 9 94.Sh AUTHORS 95This manual page was written by 96.An Alfred Perlstein . 97