]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man9/VFS_CHECKEXP.9
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.git] / share / man / man9 / VFS_CHECKEXP.9
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
44 The
45 .Fn VFS_CHECKEXP
46 macro is used by the NFS server to check if a mount point is exported
47 to a client.
48 .Pp
49 The arguments it expects are:
50 .Bl -tag -width numsecflavors
51 .It Fa mp
52 The mount point to be checked.
53 .It Fa nam
54 An mbuf containing the network address of the client.
55 .It Fa exflagsp
56 Return parameter for the export flags for this client.
57 .It Fa credanonp
58 Return parameter for the anonymous credentials for this client.
59 .It Fa numsecflavors
60 Return value for the number of security flavors for this client.
61 .It Fa secflavors
62 Must be an array of size MAXSECFLAVORS, in which the security flavors
63 for this client are returned.
64 .El
65 .Pp
66 The
67 .Fn VFS_CHECKEXP
68 macro should be called on a file system's mount structure to determine if it
69 is exported to a client whose address is contained in
70 .Fa nam .
71 .Pp
72 It is called in the NFS server once a vnode for a file handle has been
73 acquired, in order to determine what access the client is allowed on
74 the file system the vnode resides in.
75 For NFSv4, it is also called whenever the lookup operation crosses a
76 server file system mount point, to update the access information.
77 .Pp
78 The operation is file system specific, but is normally handled by
79 the default ``vfs_stdcheckexp''.
80 .Sh RETURN VALUES
81 The export flags, anonymous credentials and security flavors specific to the
82 client
83 will be returned in
84 .Fa *exflagsp ,
85 .Fa *credanonp ,
86 .Fa *numsecflavors
87 and
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
95 This manual page was written by
96 .An Alfred Perlstein .