<chapter id="localdef-1"><title>Customizing <literal>LOCAL DEFINITIONS</literal></title><highlights><itemizedlist><para>This chapter describes how to customize the <literal>LOCAL DEFINITIONS</literal> section
of the <filename>label_encodings</filename> file. This chapter includes the
following topics:</para><listitem><para><olink targetptr="localdef-12" remap="internal">LOCAL DEFINITIONS Section</olink></para>
</listitem><listitem><para><olink targetptr="localdef-11" remap="internal">Modifying Sun Extensions (Task
Map)</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="localdef-12"><title><literal>LOCAL DEFINITIONS</literal> Section</title><para>Sun provides additional keywords that are not defined in the government-furnished <olink targetdoc="wslblencode" remap="external"><citetitle remap="book">Compartmented Mode Workstation Labeling: Encodings Format</citetitle></olink>. The Sun keyword extensions
are in a <literal>LOCAL DEFINITIONS</literal> section.</para><screen>*
* Local site definitions and locally configurable options.
*

LOCAL DEFINITIONS:

Classification Name= Classification;
Compartments Name= Sensitivity;

Default User Sensitivity Label= PUB;
Default User Clearance= CNF NEED TO KNOW;

COLOR NAMES:

     label= Admin_Low;           color= #bdbdbd;

     label= PUB;                 color= blue violet;
     label= SBX PLAYGROUND;      color= yellow;
     label= CNF;                 color= navy blue;
     label= CNF : INTERNAL USE ONLY;  color= blue;
     label= CNF : NEED TO KNOW;  color= #00bfff;
     label= CNF : RESTRICTED;    color= #87ceff;

     label= Admin_High;          color= #636363;

*

* End of local site definitions
*</screen><sect2 id="localdef-15"><title>Contents of <literal>LOCAL DEFINITIONS</literal> Section</title><itemizedlist><para>The Security Administrator role can do the following in the <literal>LOCAL
DEFINITIONS</literal> section:</para><listitem><para>Specify a user clearance and user minimum label that is different
from the definitions in the <literal>ACCREDITATION RANGE:</literal> section.</para><para>For the procedure, see <olink targetptr="localdef-22" remap="internal">How to Specify
Default User Labels</olink>.</para>
</listitem><listitem><para>Specify the names for column headers in label builder dialog
boxes. The column headers indicate classifications and compartments.</para><para>For the procedure, see <olink targetptr="localdef-24" remap="internal">How to Name Column
Headers in Label Builders</olink>.</para>
</listitem><listitem><para>Specify which colors are assigned to labels.</para><para>Color
definitions are optional. However, assigning colors to labels is highly recommended.</para><para>For the procedure, see <olink targetptr="localdef-26" remap="internal">How to
Assign a Color to a Label or Word</olink>.</para>
</listitem>
</itemizedlist><para>For more details on the extensions to the label encodings keywords that Trusted Extensions provides,
see the <olink targetdoc="trsolrefman" targetptr="label-encodings-4" remap="external"><citerefentry><refentrytitle>label_encodings</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page.</para>
</sect2><sect2 id="localdef-20"><title>Changing Column Headers on Label Builders</title><para>The following figure shows the column headers <literal>Classification</literal> and <literal>Category</literal> in the label builder that is displayed by the Solaris Management Console.</para><figure id="localdef-fig-1"><title>Column Headers on Label Builder</title><mediaobject><imageobject><imagedata entityref="lbr.smc.class.cat.pub.tiff"/>
</imageobject><textobject><simpara>The context describes the graphic.</simpara>
</textobject>
</mediaobject>
</figure><para>To change the column headers, see <olink targetptr="localdef-24" remap="internal">How
to Name Column Headers in Label Builders</olink>.</para>
</sect2><sect2 id="localdef-21"><title>Specifying Colors for Labels</title><para>In the <literal>LOCAL DEFINITIONS</literal> section, the <literal>COLOR
NAMES</literal> keyword is followed by zero or more color assignments. If
no color is defined for a classification in the <literal>COLOR NAMES</literal> section
of the <filename>label_encodings</filename> file, the color black is used.
The default color values are shown in the following excerpt.</para><screen>COLOR NAMES:

     label= Admin_Low;           color= #bdbdbd;

     label= PUB;                 color= blue violet;
     label= SBX PLAYGROUND;      color= yellow;
     label= CNF;                 color= navy blue;
     label= CNF : INTERNAL USE ONLY;  color= blue;
     label= CNF : NEED TO KNOW;  color= #00bfff;
     label= CNF : RESTRICTED;    color= #87ceff;

     label= Admin_High;          color= #636363;</screen><para>Colors are assigned to labels and to words within labels with the following
syntax:</para><screen>label= <replaceable>label-name</replaceable>;     color= <replaceable>color-name</replaceable>;
word= <replaceable>label-name</replaceable>;     color= <replaceable>color-name</replaceable>;</screen><para>The value of <emphasis>color-name</emphasis> can be either a text color
name or a hexadecimal color value. The color is associated with a word or
a label. The color that is assigned to a label's component displays as a background
color whenever a label includes the specified label components. The windows
software computes a complementary color for the lettering.</para><para>For an introduction to color values, see <olink targetptr="localdef-18" remap="internal">Color
Values</olink>. A full discussion of how to specify color is outside the scope
of this guide. For more information, see the <literal>X11</literal>(5) man
page in the <filename class="directory">/usr/openwin/share/man</filename> directory.
For a fuller description, see &ldquo;Color Specification&rdquo; in the O`Reilly
and Associates, Inc. <citetitle>XWindows Systems User's Guide</citetitle> (Vol.
III), ISBN number 0-937175-29-3.</para><para>Color is assigned to a label's components according to the ordering
rules that are described in the following section. For a desktop example of
color use, see <olink targetptr="localdef-fig-2" remap="internal">Figure&nbsp;5&ndash;2</olink>.
The <literal>PUBLIC</literal>, <literal>INTERNAL</literal>, and <literal>NTK_SALES</literal> workspace buttons are colored differently from each other and from
standard workspace buttons.</para><figure id="localdef-fig-2"><title>Window Labels With Colors from <literal>COLOR
NAMES</literal></title><mediaobject><imageobject><imagedata entityref="WindowLabelsColor.eps"/>
</imageobject><textobject><simpara>Illustration shows a green Public button, a yellow Internal
button, and a blue NTK_Sales button in the Front Panel.</simpara>
</textobject>
</mediaobject>
</figure><sect3 id="localdef-4"><title>Order of Color Specification</title><para>The color that is used for any label is determined according to the
following rules.</para><orderedlist><listitem><para>If a label contains a compartment word that has one or more
colors specified, then the color value associated with the first <filename>word=</filename> value
is used.</para>
</listitem><listitem><para>If a label contains none of the compartment words that are
associated with colors, and an exact match exists for the label name, then
the specified label color is used.</para>
</listitem><listitem><para>If there is no exact match for the label name, then the color
that is associated with the first specified <filename>label=</filename> value
for the <emphasis>classification</emphasis> of the label is used.</para>
</listitem><listitem><para>If the classification has no assigned color, then the color
that is assigned to the first label that contains the same classification
is used.</para>
</listitem>
</orderedlist><example id="localdef-16"><title>Colors Assigned According to Ordering Rules</title><para>In this example, a system has the following color definitions:</para><screen>label= u;       color= green
label= c;       color= blue
label= S;       color= red;
word= B;        color= orange;
label= TS;      color= yellow;
label= TS SA;   color= khaki;</screen><itemizedlist><para>The rules result in the following color display:</para><listitem><para>The label <literal>TS A</literal> displays with a yellow background,
because yellow is the color assigned to the <literal>TS</literal> classification.
Rule 3.</para>
</listitem><listitem><para>Any label with the <literal>C</literal> classification displays
with the color blue, unless the label also contains the word <literal>B</literal>.
Rule 2.</para>
</listitem><listitem><para>A label with the <literal>C B</literal> classification displays
with the color orange, because word <literal>B</literal> is orange. Rule 1.</para>
</listitem><listitem><para>Any label with the <literal>U</literal> classification always
displays with the color green. In the encodings file, word <literal>B</literal> cannot
appear with the classification <literal>U</literal>. Rule 2.</para>
</listitem>
</itemizedlist>
</example><example id="localdef-17"><title>Color Assigned to a Label With No Assigned
Color</title><para>This example illustrates rule 4. The label <literal>TS</literal> displays
the color khaki, because <literal>TS SA</literal> is the only label that includes
the <literal>TS</literal> classification. <literal>TS SA</literal> is defined
to display the color khaki.</para><screen>        label= u;       color= green
        label= c;       color= blue
        label= S;       color= red;
        word= B;        color= orange;
        label= TS SA;   color= khaki;</screen>
</example><sect4 id="localdef-18"><title>Color Values</title><para>The <filename>/usr/openwin/lib/rgb.txt</filename> database translates
color names into red, green, blue values. You can refer to the <filename>rgb.txt</filename> file
for color names to use for your site's labels. You can also use hexadecimal
color values.</para><itemizedlist><para>Briefly, here are a few high-level points about color values:</para><listitem><para>Color values specify the amount of red, green, and blue (RGB)
that compose the color.</para>
</listitem><listitem><para>RGB values can be specified with three hexadecimal numbers
from 0 to FF. Each hexadecimal number indicates the amount of red, green,
or blue in the color.</para><para>For example, pure red is #FF0000, pure green
is #00FF00, pure blue is #0000FF, pure white is #FFFFFF, and pure black is
#000000. For more information, see the <literal>X11</literal>(5) man page
in the <filename class="directory">/usr/openwin/share/man</filename> directory.</para>
</listitem><listitem><itemizedlist><para>The number of colors that are available on the screen depends on several
factors:</para><listitem><para>Amount of memory available for specifying colors</para>
</listitem><listitem><para>Number of color planes</para>
</listitem><listitem><para>How many other clients are using color cells</para>
</listitem><listitem><para>Whether private color maps are being used by other applications</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist><para>For a sample color name planner, see <olink targetptr="planex-tbl-8" remap="internal">Table&nbsp;6&ndash;8</olink>. To assign colors, see <olink targetptr="localdef-26" remap="internal">How
to Assign a Color to a Label or Word</olink>.</para>
</sect4>
</sect3>
</sect2>
</sect1><sect1 id="localdef-11"><title>Modifying Sun Extensions (Task Map)</title><informaltable frame="all" pgwide="100"><tgroup cols="2" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row><entry><para>Purpose</para>
</entry><entry><para>Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Change label and clearance defaults for users</para>
</entry><entry><para><olink targetptr="localdef-22" remap="internal">How to Specify Default User Labels</olink></para>
</entry>
</row><row><entry><para>Specify colors for labels</para>
</entry><entry><para><olink targetptr="localdef-26" remap="internal">How to Assign a Color to a Label or Word</olink></para>
</entry>
</row><row><entry><para>Customize label builder headers</para>
</entry><entry><para><olink targetptr="localdef-24" remap="internal">How to Name Column Headers in Label Builders</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><task id="localdef-22"><title>How to Specify Default User Labels</title><taskprerequisites><para>You must be in the Security Administrator role in the global zone.</para>
</taskprerequisites><procedure><step><para>Edit the <filename>label_encodings</filename> file.</para><para>Use
the Edit Encodings action. For details, see <olink targetptr="modifyenc-22" remap="internal">How
to Create a label_encodings File</olink>.</para>
</step><step><para>Find the line in the <literal>LOCAL DEFINITIONS</literal> section
that begins with <literal>Default User Sensitivity Label</literal>.</para><screen>Default User Sensitivity Label= u;
Default User Clearance= c;</screen>
</step><step><para>Replace the sensitivity label with your desired minimum user label.</para><para>The following example shows a new minimum label of <literal>c</literal>.</para><screen><filename>Default User Sensitivity Label= c;</filename></screen>
</step><step><para>Replace the clearance with your desired user clearance.</para><para>The
following example shows a new clearance of <literal>s</literal>.</para><screen><filename>Default User Clearance= s;</filename></screen>
</step>
</procedure>
</task><task id="localdef-26"><title>How to Assign a Color to a Label or Word</title><tasksummary><para>To minimize color-flashing, use color names or hexadecimal color values
that you know have been specified for other applications. The default color
values have been chosen with memory limitations for color in mind.</para>
</tasksummary><taskprerequisites><para>You must be in the Security Administrator role in the global zone.</para>
</taskprerequisites><procedure><step><para>Edit the <filename>label_encodings</filename> file.</para><para>Use
the Edit Encodings action. For details, see <olink targetptr="modifyenc-22" remap="internal">How
to Create a label_encodings File</olink>.</para>
</step><step><para>Find the <literal>COLOR NAMES</literal> section.</para><screen>COLOR NAMES:
          label= Admin_Low;       color= #bdbdbd;
          ...
          label= Admin_High;      color= #636363;</screen>
</step><step><para>Define a color for each classification.</para><para>In this example, the classification <literal>REGISTERED</literal> is
assigned the color red. The <literal>NEED_TO_KNOW SYSADM</literal> classification
is assigned the color blue.</para><screen>label= REGISTERED;  color= red;
label= NEED TO KNOW; color= blue;</screen>
</step><step performance="optional"><para>Define colors for individual compartment
words.</para><para>To distinguish certain compartment words irrespective of
the classification with which they are associated, assign a separate color
to those words. </para><substeps><step><para>Determine the possible color names on your system.</para><para>The names are defined in a local color database. For more information,
see the <literal>X11</literal>(5) man page in the <filename class="directory">/usr/openwin/share/man</filename> directory.</para><screen>% <userinput>grep Red /usr/openwin/lib/X11/rgb.txt</userinput>
...
255  69   0             OrangeRed
219 112 147             PaleVioletRed
...
139   0   0             DarkRed</screen>
</step><step><para>Assign the color names.</para><screen>word= EMGT; color= OrangeRed;</screen>
</step>
</substeps>
</step><step performance="optional"><para>Define colors for labels.</para><para>In
this example, the color MediumPurple4 is assigned to a label.</para><screen>label= NEED TO KNOW SYSADM; color= MediumPurple4;</screen>
</step>
</procedure>
</task><task id="localdef-24"><title>How to Name Column Headers in Label Builders</title><taskprerequisites><para>You must be in the Security Administrator role in the global zone.</para>
</taskprerequisites><procedure><step><para>Edit the <filename>label_encodings</filename> file.</para><para>Use
the Edit Encodings action. For details, see <olink targetptr="modifyenc-22" remap="internal">How
to Create a label_encodings File</olink>.</para>
</step><step><para>Find the &ldquo;Classification Name&rdquo; line in the <literal>LOCAL
DEFINITIONS</literal> section.</para><para>This line and the following line
define the column headers in the label builder.</para><screen>Classification Name= Classification;
Compartments Name= Sensitivity;</screen>
</step><step><para>Assign different names to the column headers.</para><para>The
following example shows the column headers from <filename>label_encodings.simple</filename>.</para><screen>Classification Name= Classification;
Compartments Name= Department;</screen>
</step>
</procedure>
</task>
</sect1>
</chapter>