This example gets the CMW label on a window. The process sensitivity label equals the window sensitivity label so no privileges are required.
/* Retrieve window CMW label */
retval = XTSOLgetResLabel(display, window, IsWindow, &cmwlabel);
/* Translate labels to string and print */
retval = bcltos(&cmwlabel, &string, 0, LONG_WORDS);
printf("CWM label = %s\n", string);
The printf(1)statement prints the following:
CMW label = ADMIN_LOW[C] |