1 .\" $NetBSD: extattr.3,v 1.2 2005/01/02 18:23:25 wiz Exp $
3 .\" Copyright (c) 2001 Dima Dorfman <dd@FreeBSD.org>
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/lib/libc/posix1e/extattr.3,v 1.5 2002/12/12 17:25:53 ru Exp
33 .Nm extattr_namespace_to_string ,
34 .Nm extattr_string_to_namespace
35 .Nd convert an extended attribute namespace identifier to a string and vice versa
41 .Fn extattr_namespace_to_string "int attrnamespace" "char **string"
43 .Fn extattr_string_to_namespace "const char *string" "int *attrnamespace"
46 .Fn extattr_namespace_to_string
47 function converts a VFS extended attribute identifier to a human-readable
50 .Fn extattr_string_to_namespace
51 converts a human-readable string representing a namespace to a
53 Although a file system may implement arbitrary namespaces,
54 these functions only support the
55 .Dv EXTATTR_NAMESPACE_USER
58 .Dv EXTATTR_NAMESPACE_SYSTEM
64 These functions are meant to be used in error reporting and other
67 instead of printing the integer identifying an extended attribute in
70 .Fn extattr_namespace_to_string
71 to obtain a human-readable representation.
73 instead of requiring a user to enter the integer representing a namespace,
74 an interactive program might ask for a name and use
75 .Fn extattr_string_to_namespace
76 to get the desired identifier.
78 If any of the calls are unsuccessful, the value \-1 is returned
79 and the global variable
81 is set to indicate the error.
85 The requested namespace could not be identified.
89 .Xr extattr_get_file 2 ,
92 Extended attribute support was developed as part of the
94 Project, and introduced in
98 It was developed to support security extensions requiring additional labels
99 to be associated with each file or directory.