]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man9/VOP_LISTEXTATTR.9
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man9 / VOP_LISTEXTATTR.9
1 .\"-
2 .\" Copyright (c) 2003 Network Associates Technology, Inc.
3 .\" All rights reserved.
4 .\"
5 .\" This software was developed for the FreeBSD Project in part by Network
6 .\" Associates Laboratories, the Security Research Division of Network
7 .\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),
8 .\" as part of the DARPA CHATS research program.
9 .\"
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
12 .\" are met:
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\"    notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\"    notice, this list of conditions and the following disclaimer in the
17 .\"    documentation and/or other materials provided with the distribution.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .Dd August 19, 2005
34 .Dt VOP_LISTEXTATTR 9
35 .Os
36 .Sh NAME
37 .Nm VOP_LISTEXTATTR
38 .Nd retrieve a list of named extended attribute from a vnode
39 .Sh SYNOPSIS
40 .In sys/param.h
41 .In sys/vnode.h
42 .In sys/extattr.h
43 .Ft int
44 .Fo VOP_LISTEXTATTR
45 .Fa "struct vnode *vp"
46 .Fa "int attrnamespace"
47 .Fa "struct uio *uio"
48 .Fa "size_t *size"
49 .Fa "struct ucred *cred"
50 .Fa "struct thread *td"
51 .Fc
52 .Sh DESCRIPTION
53 This vnode call may be used to retrieve a list of named extended attributes
54 from a specified namespace on a file or directory.
55 .Pp
56 Its arguments are:
57 .Bl -tag -width ".Fa attrnamespace"
58 .It Fa vp
59 The vnode of the file or directory.
60 .It Fa attrnamespace
61 Integer constant indicating which extended attribute namespace the attribute
62 name is present in.
63 .It Fa uio
64 The location of the data to be read.
65 The resulting data will be a list of attribute names.
66 Each list entry consists of a single byte containing the length of
67 the attribute name, followed by the attribute name.
68 The attribute name is not terminated by
69 .Tn ASCII
70 .Dv NUL .
71 .It Fa size
72 If not
73 .Dv NULL ,
74 on return it will contain the number of bytes required to read the list.
75 In most cases
76 .Fa uio
77 will be
78 .Dv NULL
79 when
80 .Fa size
81 is not, and vice versa.
82 .It Fa cred
83 The user credentials to use in authorizing the request.
84 .It Fa td
85 The thread requesting the extended attribute.
86 .El
87 .Pp
88 The
89 .Fa cred
90 pointer may be
91 .Dv NULL
92 to indicate that access control checks are not to be performed, if possible.
93 This
94 .Fa cred
95 setting might be used to allow the kernel to authorize extended attribute
96 retrieval that the active process might not be permitted to do.
97 .Pp
98 Extended attribute semantics may vary by file system implementing the call.
99 More information on extended attributes may be found in
100 .Xr extattr 9 .
101 .Sh LOCKS
102 The vnode will be locked on entry and should remain locked on return.
103 .Sh RETURN VALUES
104 On success, zero will be returned, and the
105 .Fa uio
106 structure will be updated to
107 reflect the list read.
108 Otherwise, an appropriate error code is returned.
109 .Sh ERRORS
110 .Bl -tag -width Er
111 .It Bq Er EACCES
112 The caller does not have the appropriate privilege.
113 .It Bq Er ENXIO
114 The request was not valid in this file system for the specified vnode and
115 attribute name.
116 .It Bq Er ENOMEM
117 Sufficient memory is not available to fulfill the request.
118 .It Bq Er EFAULT
119 The
120 .Fa uio
121 structure refers to an invalid userspace address.
122 .It Bq Er EINVAL
123 The
124 .Fa namespace
125 or
126 .Fa uio
127 argument is invalid.
128 .It Bq Er EOPNOTSUPP
129 The file system does not support
130 .Fn VOP_LISTEXTATTR .
131 .El
132 .Sh SEE ALSO
133 .Xr extattr 9 ,
134 .Xr vnode 9 ,
135 .Xr VOP_GETEXTATTR 9 ,
136 .Xr VOP_SETEXTATTR 9