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 GETZONELABELBYID 3TSOL "Jul 20, 2007"
8 getzonelabelbyid, getzonelabelbyname, getzoneidbylabel \- map between zones and
13 \fBcc\fR [\fIflags\fR...] \fIfile\fR... \fB-ltsol\fR [\fIlibrary\fR...]
18 #include <tsol/label.h>
20 \fBm_label_t *\fR\fBgetzonelabelbyid\fR(\fBzoneid_t\fR \fIzoneid\fR);
25 \fBm_label_t *\fR\fBgetzonelabelbyname\fR(\fBconst char *\fR\fIzonename\fR);
30 \fBzoneid_t *\fR\fBgetzoneidbylabel\fR(\fBconst m_label_t *\fR\fIlabel\fR);
36 The \fBgetzonelabelbyid()\fR function returns the mandatory access control
37 (MAC) label of \fIzoneid\fR.
40 The \fBgetzonelabelbyname()\fR function returns the MAC label of the zone whose
41 name is \fIzonename\fR.
44 The \fBgetzoneidbylabel()\fR function returns the zone ID of the zone whose
48 All of these functions require that the specified zone's state is at least
49 \fBZONE_IS_READY\fR. The zone of the calling process must dominate the
50 specified zone's label, or the calling process must be in the global zone.
54 On successful completion, the \fBgetzonelabelbyid()\fR and
55 \fBgetzonelabelbyname()\fR functions return a pointer to a sensitivity label
56 that is allocated within these functions. To free the storage, use
57 \fBm_label_free\fR(3TSOL). If the zone does not exist, \fBNULL\fR is returned.
60 On successful completion, the \fBgetzoneidbylabel()\fR function returns the
61 zone ID with the matching label. If there is no matching zone, the function
66 The \fBgetzonelabelbyid()\fR and \fBgetzonelabelbyname()\fR functions will fail
74 The specified zone does not exist.
79 The \fBgetzonelabelbyid()\fR function will fail if:
86 No zone corresponds to the specified label.
92 See \fBattributes\fR(5) for descriptions of the following attributes:
100 ATTRIBUTE TYPE ATTRIBUTE VALUE
102 Interface Stability Committed
110 \fBIntro\fR(2), \fBgetzonenamebyid\fR(3C), \fBgetzoneidbyname\fR(3C),
111 \fBlibtsol\fR(3LIB), \fBm_label_free\fR(3TSOL), \fBattributes\fR(5),
116 The functionality described on this manual page is available only if the system
117 is configured with Trusted Extensions.