Merge branch 'less_closed'
[unleashed.git] / usr / src / man / man3tsol / getplabel.3tsol
blob10db5e9ed700854b930fc0c717c3cb84231b3cf7
1 '\" te
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 GETPLABEL 3TSOL "Jul 20, 2007"
7 .SH NAME
8 getplabel \- get process label
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-ltsol\fR [\fIlibrary\fR...]
13 .fi
15 .LP
16 .nf
17 #include <tsol/label.h>
19 \fBint\fR \fBgetplabel\fR(\fBm_label_t *\fR\fIlabel_p\fR);
20 .fi
22 .SH DESCRIPTION
23 .sp
24 .LP
25 The \fBgetplabel()\fR function obtains the sensitivity label of the calling
26 process.
27 .SH RETURN VALUES
28 .sp
29 .LP
30 Upon successful completion, \fBgetplabel()\fR returns 0. Otherwise it returns
31 -1, \fIlabel_p\fR is unchanged, and \fIerrno\fR is set to indicate the error.
32 .SH ERRORS
33 .sp
34 .LP
35 The \fBgetplabel()\fR function fails and \fIlabel_p\fR does not refer to a
36 valid sensitivity label if:
37 .sp
38 .ne 2
39 .na
40 \fB\fBEFAULT\fR\fR
41 .ad
42 .RS 10n
43 \fIlabel_p\fR points to an invalid address.
44 .RE
46 .SH ATTRIBUTES
47 .sp
48 .LP
49 See \fBattributes\fR(5) for descriptions of the following attributes:
50 .sp
52 .sp
53 .TS
54 box;
55 c | c
56 l | l .
57 ATTRIBUTE TYPE  ATTRIBUTE VALUE
59 Interface Stability     Committed
61 MT-Level        MT-Safe
62 .TE
64 .SH SEE ALSO
65 .sp
66 .LP
67 \fBucred_getlabel\fR(3C), \fBlibtsol\fR(3LIB), \fBm_label_alloc\fR(3TSOL),
68 \fBm_label_free\fR(3TSOL), \fBattributes\fR(5)
69 .sp
70 .LP
71 \fIObtaining a Process Label\fR in \fISolaris Trusted Extensions Developer\&'s
72 Guide\fR
73 .SH NOTES
74 .sp
75 .LP
76 The functionality described on this manual page is available only if the system
77 is configured with Trusted Extensions.
78 .sp
79 .LP
80 This function returns different values for system processes than
81 \fBucred_getlabel\fR(3C) returns.