2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETZONEROOTBYID 3TSOL "Jul 20, 2007"
8 getzonerootbyid, getzonerootbylabel, getzonerootbyname \- map between zone root
13 \fBcc\fR [\fIflags\fR...] \fIfile\fR... \fB-ltsol\fR [\fIlibrary\fR...]
18 #include <tsol/label.h>
20 \fBchar *\fR\fBgetzonerootbyid\fR(\fBzoneid_t\fR \fIzoneid\fR);
25 \fBchar *\fR\fBgetzonerootbylabel\fR(\fBconst m_label_t *\fR\fIlabel\fR);
30 \fBchar *\fR\fBgetzonerootbyname\fR(\fBconst char *\fR\fIzonename\fR);
36 The \fBgetzonerootbyid()\fR function returns the root pathname of \fIzoneid\fR.
39 The \fBgetzonerootbylabel()\fR function returns the root pathname of the zone
40 whose label is \fIlabel\fR.
43 The \fBgetzonerootbyname()\fR function returns the root pathname of
47 All of these functions require that the specified zone's state is at least
48 \fBZONE_IS_READY\fR. The zone of the calling process must dominate the
49 specified zone's label, or the calling process must be in the global zone. The
50 returned pathname is relative to the root path of the caller's zone.
54 On successful completion, the \fBgetzonerootbyid()\fR,
55 \fBgetzonerootbylabel()\fR, and \fBgetzonerootbyname()\fR functions return a
56 pointer to a pathname that is allocated within these functions. To free the
57 storage, use \fBfree\fR(3C). On failure, these functions return \fBNULL\fR and
58 set \fIerrno\fR to indicate the error.
62 These functions will fail if:
69 Invalid argument; pointer location is invalid.
78 \fIzoneid\fR invalid, or zone not found or not ready.
96 Unable to allocate pathname.
102 See \fBattributes\fR(5) for descriptions of the following attributes:
110 ATTRIBUTE TYPE ATTRIBUTE VALUE
112 Interface Stability Committed
120 \fBIntro\fR(2), \fBfree\fR(3C), \fBgetzonenamebyid\fR(3C), \fBlibtsol\fR(3LIB),
121 \fBattributes\fR(5), \fBlabels\fR(5)
125 The functionality described on this manual page is available only if the system
126 is configured with Trusted Extensions.