2 .\" Copyright (c) 2001 Dima Dorfman <dd@FreeBSD.org>
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
32 .Nm extattr_namespace_to_string ,
33 .Nm extattr_string_to_namespace
34 .Nd convert an extended attribute namespace identifier to a string and
42 .Fn extattr_namespace_to_string "int attrnamespace" "char **string"
44 .Fn extattr_string_to_namespace "const char *string" "int *attrnamespace"
47 .Fn extattr_namespace_to_string
48 function converts a VFS extended attribute identifier to a human-readable
51 .Fn extattr_string_to_namespace
52 function undoes the aforementioned operation,
53 and converts a human-readable string representing a namespace to a
55 Although a file system may implement arbitrary namespaces,
56 these functions only support the
57 .Dv EXTATTR_NAMESPACE_USER
60 .Dv EXTATTR_NAMESPACE_SYSTEM
66 These functions are meant to be used in error reporting and other
69 instead of printing the integer identifying an extended attribute in
72 .Fn extattr_namespace_to_string
73 to obtain a human-readable representation.
75 instead of requiring a user to enter the integer representing a namespace,
76 an interactive program might ask for a name and use
77 .Fn extattr_string_to_namespace
78 to get the desired identifier.
80 If any of the calls are unsuccessful, the value \-1 is returned
81 and the global variable
83 is set to indicate the error.
87 The requested namespace could not be identified.
95 Extended attribute support was developed as part of the
97 Project, and introduced in
99 It was developed to support security extensions requiring additional labels
100 to be associated with each file or directory.