Trusted Extensions Developer's Guide

Exit Print View

Updated: July 2014
 
 

Setting a Window Label

This example shows how to set the sensitivity label on a window. The new sensitivity label dominates the sensitivity label of the window and the process. The client needs the sys_trans_label privilege in its effective set to translate a label that the client does not dominate. The client also needs the win_upgrade_sl privilege to change the window's sensitivity label.

For more information about using privileges, see Developer’s Guide to Oracle Solaris 11 Security .

/* Translate text string to sensitivity label */
retval = label_to_str(string4, &label, M_LABEL, L_NO_CORRECTION, &error);

/* Set sensitivity label with new value */
retval = XTSOLsetResLabel(display, window, IsWindow, label);