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
192
193
194
195
196
197
198
199
200
201
202
203
|
'\" 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 labelclipping 3TSOL "20 Jul 2007" "SunOS 5.11" "Trusted Extensions Library Functions"
.SH NAME
labelclipping, Xbsltos, Xbcleartos \- translate a binary label and clip to the
specified width
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR \fB-lDtTsol\fR [\fIlibrary\fR...]
.fi
.LP
.nf
#include <Dt/label_clipping.h>
\fBXmString\fR \fBXbsltos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIsenslabel\fR,
\fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
.fi
.LP
.nf
\fBXmString\fR \fBXbcleartos\fR(\fBDisplay *\fR\fIdisplay\fR, \fBconst m_label_t *\fR\fIclearance\fR,
\fBDimension\fR \fIwidth\fR, \fBconst XmFontList\fR \fIfontlist\fR, \fBconst int\fR \fIflags\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The calling process must have \fBPRIV_SYS_TRANS_LABEL\fR in its set of
effective privileges to translate labels or clearances that dominate the
current process' sensitivity label.
.sp
.ne 2
.mk
.na
\fB\fIdisplay\fR\fR
.ad
.RS 13n
.rt
The structure controlling the connection to an X Window System display.
.RE
.sp
.ne 2
.mk
.na
\fB\fIsenslabel\fR\fR
.ad
.RS 13n
.rt
The sensitivity label to be translated.
.RE
.sp
.ne 2
.mk
.na
\fB\fIclearance\fR\fR
.ad
.RS 13n
.rt
The clearance to be translated.
.RE
.sp
.ne 2
.mk
.na
\fB\fIwidth\fR\fR
.ad
.RS 13n
.rt
The width of the translated label or clearance in pixels. If the specified
width is shorter than the full label, the label is clipped and the presence of
clipped letters is indicated by an arrow. In this example, letters have been
clipped to the right of: TS<-. See the \fBsbltos\fR(3TSOL) manual page for more
information on the clipped indicator. If the specified width is equal to the
display width (\fIdisplay\fR), the label is not truncated, but word-wrapped
using a width of half the display width.
.RE
.sp
.ne 2
.mk
.na
\fB\fIfontlist\fR\fR
.ad
.RS 13n
.rt
A list of fonts and character sets where each font is associated with a
character set.
.RE
.sp
.ne 2
.mk
.na
\fB\fIflags\fR\fR
.ad
.RS 13n
.rt
The value of flags indicates which words in the \fBlabel_encodings\fR(4) file
are used for the translation. See the \fBbltos\fR(3TSOL) manual page for a
description of the flag values: \fBLONG_WORDS\fR, \fBSHORT_WORDS\fR,
\fBLONG_CLASSIFICATION\fR, \fBSHORT_CLASSIFICATION\fR, \fBALL_ENTRIES,\fR
\fBACCESS_RELATED,\fR \fBVIEW_EXTERNAL\fR, \fBVIEW_INTERNAL\fR,
\fBNO_CLASSIFICATION\fR. \fBBRACKETED\fR is an additional flag that can be used
with \fBXbsltos()\fR only. It encloses the sensitivity label in square brackets
as follows: [C].
.RE
.SH RETURN VALUES
.sp
.LP
These functions return a compound string that represents the character-coded
form of the sensitivity label or clearance that is translated. The compound
string uses the language and fonts specified in \fIfontlist\fR and is clipped
to \fIwidth\fR. These functions return \fINULL\fR if the label or clearance is
not a valid, required type as defined in the \fBlabel_encodings\fR(4) file, or
not dominated by the process' sensitivity label and the
\fBPRIV_SYS_TRANS_LABEL\fR privilege is not asserted.
.SH FILES
.sp
.ne 2
.mk
.na
\fB\fB/usr/dt/include/Dt/label_clipping.h\fR\fR
.ad
.sp .6
.RS 4n
Header file for label clipping functions
.RE
.sp
.ne 2
.mk
.na
\fB\fB/etc/security/tsol/label_encodings\fR\fR
.ad
.sp .6
.RS 4n
The label encodings file contains the classification names, words, constraints,
and values for the defined labels of this system.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRTranslate and Clip a Clearance.
.sp
.LP
This example translates a clearance to text using the long words specified in
the \fBlabel_encodings\fR(4) file, a font list, and clips the translated
clearance to a width of 72 pixels.
.sp
.in +2
.nf
xmstr = Xbcleartos(XtDisplay(topLevel),
&clearance, 72, fontlist, LONG_WORDS
.fi
.in -2
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityObsolete
_
MT-LevelMT-Safe
.TE
.sp
.LP
The labelclipping functions, \fBXbsltos()\fR and \fBXbcleartos()\fR, are
obsolete. Use the \fBlabel_to_str\fR(3TSOL) function instead.
.SH SEE ALSO
.sp
.LP
\fBbltos\fR(3TSOL), \fBlabel_to_str\fR(3TSOL), \fBlibtsol\fR(3LIB),
\fBlabel_encodings\fR(4), \fBattributes\fR(5)
.sp
.LP
See \fBXmStringDraw\fR(3) and \fBFontList\fR(3) for information on the creation
and structure of a font list.
.SH NOTES
.sp
.LP
The functionality described on this manual page is available only if the system
is configured with Trusted Extensions.
|