PageRenderTime 10ms CodeModel.GetById 6ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/share/man/man9/VFS_CHECKEXP.9

https://bitbucket.org/freebsd/freebsd-head/
Unknown | 88 lines | 88 code | 0 blank | 0 comment | 0 complexity | 6e28f16f24f40eb8874a3bc104dbe5ad MD5 | raw file
 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.\" $FreeBSD$
26.\"
27.Dd January 4, 2010
28.Dt VFS_CHECKEXP 9
29.Os
30.Sh NAME
31.Nm VFS_CHECKEXP
32.Nd check if a file system is exported to a client
33.Sh SYNOPSIS
34.In sys/param.h
35.In sys/mount.h
36.Ft int
37.Fn VFS_CHECKEXP "struct mount *mp" "struct sockaddr *nam" "int *exflagsp" "struct ucred **credanonp"
38.Sh DESCRIPTION
39The
40.Fn VFS_CHECKEXP
41macro is used by the NFS server to check if a mount point is exported
42to a client.
43.Pp
44The arguments it expects are:
45.Bl -tag -width credanonp
46.It Fa mp
47The mount point to be checked.
48.It Fa nam
49An mbuf containing the network address of the client.
50.It Fa exflagsp
51Return parameter for the export flags for this client.
52.It Fa credanonp
53Return parameter for the anonymous credentials for this client.
54.El
55.Pp
56The
57.Fn VFS_CHECKEXP
58macro should be called on a file system's mount structure to determine if it
59is exported to a client whose address is contained in
60.Fa nam .
61.Pp
62It is generally called before
63.Xr VFS_FHTOVP 9
64to validate that a client has access to the file system.
65.Pp
66The file system should call
67.Xr vfs_export_lookup 9
68with the address of an appropriate
69.Vt netexport
70structure and the address of the client,
71.Fa nam ,
72to verify that the client can access this file system.
73.Sh RETURN VALUES
74The export flags and anonymous credentials specific to the client (returned
75by
76.Xr vfs_export_lookup 9 )
77will be returned in
78.Fa *exflagsp
79and
80.Fa *credanonp .
81.Sh SEE ALSO
82.Xr VFS 9 ,
83.Xr VFS_FHTOVP 9 ,
84.Xr VOP_VPTOFH 9 ,
85.Xr vnode 9
86.Sh AUTHORS
87This manual page was written by
88.An Alfred Perlstein .