Oracle Solaris Trusted Extensions Developer's Guide

Accessing Labels in Zones

The following description includes the prototype declaration for the method:

public final java.lang.String toRootPath()

This method returns the root path name of the zone for the specified sensitivity label.

The following code excerpt shows how to obtain the root path for the PUBLIC sensitivity label:


SensitivityLabel sl = SolarisLabel.getSensitivityLabel("PUBLIC");
System.out.println("toRootPath: " + sl.toRootPath();

This method throws a java.io.IOException if an invalid label is specified or if no zone is configured for the specified label.

This method mimics the getzonerootbylabel() routine. See the getzonerootbylabel(3TSOL) man page. See also Accessing Labels in Zones.