The is_system_labeled() routine is used to determine whether you are running on a Trusted Extensions system. The following routine description includes the prototype declaration for each routine:
The is_system_labeled() routine returns TRUE (1) if the Trusted Extensions software is installed and active. Otherwise, it returns FALSE (0).
See the is_system_labeled(3C) man page.
You can also use these other interfaces to determine whether the system is labeled:
X client. If you are writing an X client that depends on multilevel functionality, use the XQueryExtension() routine to query the X server for the SUN_TSOL extension.
Shell script. If you are writing a shell script that will determine whether the system is labeled, use the plabel command. See the plabel(1) man page.
The following example shows the smf_is_system_labeled() function used by the /lib/svc/share/smf_include.sh script:
# # Returns zero (success) if system is labeled (aka Trusted Extensions). # 1 otherwise. # smf_is_system_labeled() { [ ! -x /bin/plabel ] & return 1 /bin/plabel > /dev/null 2>amp;1 return $? }