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 M_LABEL 3TSOL "Jul 20, 2007"
8 m_label, m_label_alloc, m_label_dup, m_label_free \- m_label functions
12 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR [\fIlibrary\fR...]
17 #include <tsol/label.h>
19 \fBm_label_t *\fR\fBm_label_alloc\fR(\fBconst m_label_type_t\fR \fIlabel_type\fR);
24 \fBint\fR \fBm_label_dup\fR(\fBm_label_t **\fR\fIdst\fR, \fBconst m_label_t *\fR\fIsrc\fR);
29 \fBvoid\fR \fBm_label_free\fR(\fBm_label_t *\fR\fIlabel\fR);
35 The \fBm_label_alloc()\fR function allocates resources for a new label. The
36 \fIlabel_type\fR argument defines the type for a newly allocated label. The
44 A Mandatory Access Control (MAC) label.
50 \fB\fBUSER_CLEAR\fR\fR
58 The \fBm_label_dup()\fR function allocates resources for a new \fIdst\fR label.
59 The function returns a pointer to the allocated label, which is an exact copy
60 of the \fIsrc\fR label. The caller is responsible for freeing the allocated
61 resources by calling \fBm_label_free()\fR.
64 The \fBm_label_free()\fR function frees resources that are associated with the
65 previously allocated label.
69 Upon successful completion, the \fBm_label_alloc()\fR function returns a
70 pointer to the newly allocated label. Otherwise, \fBm_label_alloc()\fR returns
71 \fINULL\fR and \fIerrno\fR is set to indicate the error.
74 Upon successful completion, the \fBm_label_dup()\fR function returns 0.
75 Otherwise, \fB-1\fR is returned and \fIerrno\fR is set to indicate the error.
79 The \fBm_label_alloc()\fR function will fail if:
95 The physical limits of the system are exceeded by size bytes of memory which
102 See \fBattributes\fR(5) for descriptions of the following attributes:
110 ATTRIBUTE TYPE ATTRIBUTE VALUE
112 Interface Stability Committed
120 \fBlabel_to_str\fR(3TSOL), \fBlibtsol\fR(3LIB), \fBstr_to_label\fR(3TSOL),
121 \fBlabel_encodings\fR(4), \fBattributes\fR(5), \fBlabels\fR(5)
124 \fIDetermining Whether the Printing Service Is Running in a Labeled
125 Environment\fR in \fISolaris Trusted Extensions Developer\&'s Guide\fR
129 The functionality described on this manual page is available only if the system
130 is configured with Trusted Extensions.