]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/setextattr/setextattr.8
This commit was generated by cvs2svn to compensate for changes in r98038,
[FreeBSD/FreeBSD.git] / usr.sbin / setextattr / setextattr.8
1 .\"-
2 .\" Copyright (c) 2000, 2001 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
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.
13 .\"
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
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd March 30, 2000
29 .Dt SETEXTATTR 8
30 .Os
31 .Sh NAME
32 .Nm setextattr
33 .Nd set a named extended attribute
34 .Sh SYNOPSIS
35 .Nm
36 .Ar attrnamespace
37 .Ar attrname
38 .Ar filename
39 .Ar attrvalue
40 .Sh DESCRIPTION
41 .Nm
42 is a user tool to set a named extended attribute on a file or directory to
43 the provided string.
44 The
45 .Ar attrnamespace
46 argument should be the namespace of the attribute to retrieve: legal
47 values are "user" and "system".
48 The
49 .Ar attrname
50 argument should be the name of the attribute,
51 .Ar filename
52 the name of the file or directory to set the attribute for, and
53 .Ar attrvalue
54 a string to store in the attribute.
55 .Nm
56 will store the string in the file's attribute.
57 In order for
58 .Nm
59 to succeed, the attribute service must be available on the file system,
60 and appropriate privilege may be required.
61 .Sh EXAMPLES
62 .Dl # setextattr system md5 /boot/kernel/kernel `md5 -q /boot/kernel/kernel`
63 .Pp
64 Set the
65 .Dq md5
66 extended attribute on the file /boot/kernel/kernel to the string
67 containing the output of
68 .Dq md5 -q /boot/kernel/kernel .
69 .Sh SEE ALSO
70 .Xr extattr 2 ,
71 .Xr extattr 3 ,
72 .Xr extattrctl 8 ,
73 .Xr getextattr 8 ,
74 .Xr extattr 9
75 .Sh HISTORY
76 Extended attribute support was developed as part of the TrustedBSD Project,
77 and introduced in
78 .Fx 5.0 .
79 It was developed to support security extensions requiring additional labels
80 to be associated with each file or directory.
81 .Sh AUTHORS
82 Robert N M Watson
83 .Sh BUGS
84 .Nm
85 can only be used to set attributes to strings.