This example sets the CMW label on a window. The new sensitivity label dominates the window's and process's sensitivity label. The client needs the sys_trans_label privilege in its effective set to translate a label it does not dominate, and the win_upgrade_sl privilege to change the window sensitivity label.
/* Translate text string to binary sensitivity label and */ /* Turn sys_trans_label on in the effective set */ retval = stobsl(&string4, &senslabel, NEW_LABEL, &error); /* Turn sys_trans_label off */ /* Set the sensitivity label in the cmwlabel structure */ setcsl(&cmwlabel, &senslabel); /* Set sensitivity label portion of CMW label with new value */ /* and turn win_upgrade_sl on in the effective set */ retval = XTSOLsetResLabel(display, window, IsWindow, &cmwlabel, SETCL_SL); /* Turn the win_upgrade_sl privilege off */