2 .\" Copyright (c) 1999, 2000, 2001, 2003 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd retrieve named extended attribute from a vnode
40 .Fa "struct vnode *vp"
41 .Fa "int attrnamespace"
42 .Fa "const char *name"
45 .Fa "struct ucred *cred"
46 .Fa "struct thread *td"
49 This vnode call may be used to retrieve a specific named extended attribute
50 from a file or directory.
53 .Bl -tag -width ".Fa attrnamespace"
55 The vnode of the file or directory.
57 Integer constant indicating which extended attribute namespace the attribute
60 Pointer to a null-terminated character string containing the attribute name.
62 The location of the data to be read.
66 on return it will contain the number of bytes required to read all of the
74 is not, and vice versa.
76 The user credentials to use in authorizing the request.
78 The thread requesting the extended attribute.
85 to indicate that access control checks are not to be performed, if possible.
88 setting might be used to allow the kernel to authorize extended attribute
89 retrieval that the active process might not be permitted to do.
91 Extended attribute semantics may vary by file system implementing the call.
92 More information on extended attributes may be found in
95 The vnode will be locked on entry and should remain locked on return.
97 On success, zero will be returned, and the uio structure will be updated to
99 Otherwise, an appropriate error code is returned.
103 The requested attribute was not defined for this vnode.
105 The caller does not have the appropriate privilege.
107 The request was not valid in this file system for the specified vnode and
110 Sufficient memory is not available to fulfill the request.
112 The uio structure refers to an invalid userspace address.
121 The file system does not support
127 .Xr VOP_LISTEXTATTR 9 ,
130 By passing in the empty string as the attribute name, some file systems
131 will return a list of defined names on the target vnode for the
133 This is a bad API, and will be replaced by an explicit VOP.