1 .\" $NetBSD: extattr.9,v 1.3 2007/02/08 22:27:20 dillo Exp $
3 .\" Copyright (c) 1999, 2000, 2001, 2003 Robert N. M. Watson
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" FreeBSD: src/share/man/man9/extattr.9,v 1.14 2003/10/23 02:33:03 hmp Exp
34 .Nd file system extended attributes
40 Extended attributes allow additional meta-data to be associated
41 with vnodes representing files and directories.
42 The semantics of this additional data is that of a
44 pair, where a name may be defined or undefined, and if defined,
45 associated with zero or more bytes of arbitrary binary data.
46 Extended attribute names exist within a set of namespaces; each operation
47 on an extended attribute is required to provide the namespace to which the
49 If the same name is present in multiple namespaces, the extended attributes
50 associated with the names are stored and manipulated independently.
51 The following two namespaces are defined universally, although individual
52 file systems may implement additional namespaces, or not implement
54 .Dv EXTATTR_NAMESPACE_USER ,
55 .Dv EXTATTR_NAMESPACE_SYSTEM .
56 The semantics of these attributes are intended to be as follows: user
57 attribute data is protected according the normal discretionary
58 and mandatory protections associated with the data in the file or
59 directory; system attribute data is protected such that appropriate
60 privilege is required to directly access or manipulate these attributes.
62 Reads of extended attribute data may return specific contiguous regions of
63 the meta-data, in the style of
65 but writes will replace the entire current
67 associated with a given name.
68 As there are a plethora of file systems with differing extended attributes,
69 availability and functionality of these functions may be limited, and they
70 should be used with awareness of the underlying semantics of the supporting
72 Authorization schemes for extended attribute data may also vary by file
73 system, as well as maximum attribute size, and whether or not any or
74 specific new attributes may be defined.
76 Extended attributes are named using a nul-terminated character string.
77 Depending on underlying file system semantics, this name may or may not be
79 Appropriate vnode extended attribute calls are:
80 .Xr VOP_GETEXTATTR 9 ,
81 .Xr VOP_LISTEXTATTR 9 ,
83 .Xr VOP_SETEXTATTR 9 .