'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .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
\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.