Oracle Solaris Trusted Extensions Developer's Guide

Label Builder Behavior

The Label Builder dialog box prompts the end user for information and generates a valid sensitivity label from the input. Label Builder ensures that a valid label or clearance is built. The labels and clearances are defined in the label_encodings file for the system.

Label Builder provides default behavior for the OK, Reset, Cancel, and Update buttons. The callback passed to the tsol_lbuild_create() routine is mapped to the OK button to provide application-specific behavior.

Keyboard Entry and Update Button

The Update button takes the text the user types in the Update With field and checks that the string is a valid label or clearance as defined in the label_encodings file.

When the user clicks OK, the user-built value is handled according to the OK button callback implementation.

Radio Button Options

The Label Settings radio button options enable you to build a sensitivity label or clearance from classifications and compartments. These options also enable you to build an information label from classifications, compartments, and markings. Depending on the mode, one of these buttons might be grayed out. This approach is independent of the keyboard entry and Update button method described in the previous section.

The information about the classifications, compartments, and markings is specified in the label_encodings file for the system. The combinations and constraints that are specified in the label_encodings file are enforced by graying out invalid combinations. The Label field is updated and the value is stored in the appropriate working label field of the ModLabelData variable that is returned by the tsol_lbuild_create() routine when the user chooses options. The user can build a sensitivity label or a clearance by selecting radio buttons in the classification (CLASS) and compartment (COMPS) lists.

When the user clicks OK, the user-built value is handled according to the OK button callback implementation.

Reset Button

The Reset button sets the text in the Label field to what its value was when the application started.

Cancel Button

The Cancel button exits the application without saving any changes.