Trusted Solaris Developer's Guide

Accessing CMW Label Portions

The procedure "Get Process CMW Label" uses the getcsl(3TSOL) and setcsl(3TSOL) routines to get and set the sensitivity portion of a process and file CMW label. This example uses routines to return a pointer to the sensitivity label portion of a CMW label.

#include <tsol/label.h>

main()
{
	bslabel_t *senslabel;
	bclabel_t pCMWlabel;
	int retval;

	retval = getcmwplabel(pCMWlabel);

/* Get a pointer to the sensitivity label portion of cmwlabel */
	senslabel = bcltosl(&pCMWlabel);

}