1fb6d83aaSAlfred Perlstein.\" 22f42dfd0SAlfred Perlstein.\" Copyright (c) 1999 Alfred Perlstein 3fb6d83aaSAlfred Perlstein.\" 4fb6d83aaSAlfred Perlstein.\" All rights reserved. 5fb6d83aaSAlfred Perlstein.\" 6fb6d83aaSAlfred Perlstein.\" This program is free software. 7fb6d83aaSAlfred Perlstein.\" 8fb6d83aaSAlfred Perlstein.\" Redistribution and use in source and binary forms, with or without 92f42dfd0SAlfred Perlstein.\" modification, are permitted provided that the following condition 102f42dfd0SAlfred Perlstein.\" is met: 112f42dfd0SAlfred Perlstein.\" Redistributions of source code must retain the above copyright 122f42dfd0SAlfred Perlstein.\" notice, this condition and the following disclaimer. 13fb6d83aaSAlfred Perlstein.\" 14fb6d83aaSAlfred Perlstein.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 15fb6d83aaSAlfred Perlstein.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16fb6d83aaSAlfred Perlstein.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17fb6d83aaSAlfred Perlstein.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 18fb6d83aaSAlfred Perlstein.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19fb6d83aaSAlfred Perlstein.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20fb6d83aaSAlfred Perlstein.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21fb6d83aaSAlfred Perlstein.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22fb6d83aaSAlfred Perlstein.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23fb6d83aaSAlfred Perlstein.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24fb6d83aaSAlfred Perlstein.\" 25*1eb22464SRick Macklem.Dd June 17, 2020 26fb6d83aaSAlfred Perlstein.Dt VFS_CHECKEXP 9 27aa12cea2SUlrich Spörlein.Os 28fb6d83aaSAlfred Perlstein.Sh NAME 29fb6d83aaSAlfred Perlstein.Nm VFS_CHECKEXP 307603b950SJeroen Ruigrok van der Werven.Nd check if a file system is exported to a client 31fb6d83aaSAlfred Perlstein.Sh SYNOPSIS 3232eef9aeSRuslan Ermilov.In sys/param.h 3332eef9aeSRuslan Ermilov.In sys/mount.h 34fb6d83aaSAlfred Perlstein.Ft int 350652c6c7SRick Macklem.Fo VFS_CHECKEXP 360652c6c7SRick Macklem.Fa "struct mount *mp" 370652c6c7SRick Macklem.Fa "struct sockaddr *nam" 380652c6c7SRick Macklem.Fa "uint64_t *exflagsp" 390652c6c7SRick Macklem.Fa "struct ucred **credanonp" 400652c6c7SRick Macklem.Fa "int *numsecflavor" 410652c6c7SRick Macklem.Fa "int *secflavors" 426f5b118fSSergey Kandaurov.Fc 43fb6d83aaSAlfred Perlstein.Sh DESCRIPTION 4459292cdbSGiorgos KeramidasThe 4559292cdbSGiorgos Keramidas.Fn VFS_CHECKEXP 4659292cdbSGiorgos Keramidasmacro is used by the NFS server to check if a mount point is exported 472f42dfd0SAlfred Perlsteinto a client. 48fb6d83aaSAlfred Perlstein.Pp 4959292cdbSGiorgos KeramidasThe arguments it expects are: 50*1eb22464SRick Macklem.Bl -tag -width numsecflavors 510640e9e0SHiten Pandya.It Fa mp 52fb6d83aaSAlfred PerlsteinThe mount point to be checked. 530640e9e0SHiten Pandya.It Fa nam 54fb6d83aaSAlfred PerlsteinAn mbuf containing the network address of the client. 550640e9e0SHiten Pandya.It Fa exflagsp 56fb6d83aaSAlfred PerlsteinReturn parameter for the export flags for this client. 570640e9e0SHiten Pandya.It Fa credanonp 58fb6d83aaSAlfred PerlsteinReturn parameter for the anonymous credentials for this client. 590652c6c7SRick Macklem.It Fa numsecflavors 600652c6c7SRick MacklemReturn value for the number of security flavors for this client. 610652c6c7SRick Macklem.It Fa secflavors 620652c6c7SRick MacklemMust be an array of size MAXSECFLAVORS, in which the security flavors 630652c6c7SRick Macklemfor this client are returned. 64fb6d83aaSAlfred Perlstein.El 65fb6d83aaSAlfred Perlstein.Pp 6659292cdbSGiorgos KeramidasThe 6759292cdbSGiorgos Keramidas.Fn VFS_CHECKEXP 6859292cdbSGiorgos Keramidasmacro should be called on a file system's mount structure to determine if it 697603b950SJeroen Ruigrok van der Wervenis exported to a client whose address is contained in 70fb6d83aaSAlfred Perlstein.Fa nam . 71fb6d83aaSAlfred Perlstein.Pp 72*1eb22464SRick MacklemIt is called in the NFS server once a vnode for a file handle has been 73*1eb22464SRick Macklemacquired, in order to determine what access the client is allowed on 74*1eb22464SRick Macklemthe file system the vnode resides in. 75*1eb22464SRick MacklemFor NFSv4, it is also called whenever the lookup operation crosses a 76*1eb22464SRick Macklemserver file system mount point, to update the access information. 77fb6d83aaSAlfred Perlstein.Pp 78*1eb22464SRick MacklemThe operation is file system specific, but is normally handled by 79*1eb22464SRick Macklemthe default ``vfs_stdcheckexp''. 80fb6d83aaSAlfred Perlstein.Sh RETURN VALUES 810652c6c7SRick MacklemThe export flags, anonymous credentials and security flavors specific to the 82*1eb22464SRick Macklemclient 83fb6d83aaSAlfred Perlsteinwill be returned in 840652c6c7SRick Macklem.Fa *exflagsp , 850652c6c7SRick Macklem.Fa *credanonp , 860652c6c7SRick Macklem.Fa *numsecflavors 87fb6d83aaSAlfred Perlsteinand 880652c6c7SRick Macklem.Fa *secflavors . 89fb6d83aaSAlfred Perlstein.Sh SEE ALSO 90fb6d83aaSAlfred Perlstein.Xr VFS 9 , 91fb6d83aaSAlfred Perlstein.Xr VFS_FHTOVP 9 , 921e9469d1SChristian Brueffer.Xr vnode 9 , 931e9469d1SChristian Brueffer.Xr VOP_VPTOFH 9 94fb6d83aaSAlfred Perlstein.Sh AUTHORS 9509356c84SHiten PandyaThis manual page was written by 96fb6d83aaSAlfred Perlstein.An Alfred Perlstein . 97