1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SETLABEL 1 "Jul 20, 2007"
.SH NAME
setlabel \- move files to zone with corresponding sensitivity label
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/setlabel\fR \fInewlabel\fR \fIfilename\fR...
.fi
.SH DESCRIPTION
.sp
.LP
\fBsetlabel\fR moves files into the zone whose label corresponds to
\fInewlabel\fR. The old file pathname is adjusted so that it is relative to the
root pathname of the new zone. If the old pathname for a file's parent
directory does not exist as a directory in the new zone, the file is not moved.
Once moved, the file might no longer be accessible in the current zone.
.sp
.LP
Unless \fInewlabel\fR and \fIfilename\fR have been specified, no labels are
set.
.sp
.LP
Labels are defined by the security administrator at your site. The system
always displays labels in uppercase. Users can enter labels in any combination
of uppercase and lowercase. Incremental changes to labels are supported.
.sp
.LP
Refer to \fBsetflabel\fR(3TSOL) for a complete description of the conditions
that are required to satisfy this command, and the privileges that are needed
to execute this command.
.SH EXIT STATUS
.sp
.LP
\fBsetlabel\fR exits with one of the following values:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Usage error.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
Error in getting, setting or translating the label.
.RE
.SH USAGE
.sp
.LP
On the command line, enclose the label in double quotes unless the label is
only one word. Without quotes, a second word or letter separated by a space is
interpreted as a second argument.
.sp
.in +2
.nf
% \fBsetlabel SECRET \fIsomefile\fR\fR
% \fBsetlabel "TOP SECRET" \fIsomefile\fR\fR
.fi
.in -2
.sp
.sp
.LP
Use any combination of upper and lowercase letters. You can separate items in a
label with blanks, tabs, commas or slashes (\fB/\fR). Do not use any other
punctuation.
.sp
.in +2
.nf
% \fBsetlabel "ts a b" \fIsomefile\fR\fR
% \fBsetlabel "ts,a,b" \fIsomefile\fR\fR
% \fBsetlabel "ts/a b" \fIsomefile\fR\fR
% \fBsetlabel " TOP SECRET A B " \fIsomefile\fR\fR
.fi
.in -2
.sp
.SH EXAMPLES
.LP
\fBExample 1 \fRSet a Label.
.sp
.LP
To set \fIsomefile\fR's label to \fBSECRET A\fR:
.sp
.in +2
.nf
example% \fBsetlabel "Secret a" \fIsomefile\fR\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRTurn On a Compartment.
.sp
.LP
Plus and minus signs can be used to modify an existing label. A plus sign turns
on the specified compartment for \fIsomefile\fR's label.
.sp
.in +2
.nf
example% \fBsetlabel +b \fIsomefile\fR\fR
.fi
.in -2
.sp
.LP
\fBExample 3 \fRTurn Off a Compartment.
.sp
.LP
A minus sign turns off the compartments that are associated with a
classification. To turn off compartment \fBA\fR in \fIsomefile\fR's label:
.sp
.in +2
.nf
example% \fBsetlabel -A \fIsomefile\fR\fR
.fi
.in -2
.sp
.sp
.LP
If an incremental change is being made to an existing label and the first
character of the label is a hyphen (\fB\(mi\fR), a preceding double-hyphen
(\fB--\fR) is required.
.sp
.LP
To turn off compartment \fB-A\fR in \fIsomefile\fR's label:
.sp
.in +2
.nf
example% \fBsetlabel -- -A \fIsomefile\fR\fR
.fi
.in -2
.sp
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Committed
.TE
.SH SEE ALSO
.sp
.LP
\fBsetflabel\fR(3TSOL), \fBlabel_encodings\fR(4), \fBattributes\fR(5)
.SH NOTES
.sp
.LP
The functionality described on this manual page is available only if the system
is configured with Trusted Extensions.
.sp
.LP
This implementation of setting a label is meaningful for the Defense
Intelligence Agency (DIA) Mandatory Access Control (MAC) policy. For more
information, see \fBlabel_encodings\fR(4).
|