Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
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.
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.
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]
cc [flag...] file... -ltsol [library...]
#include <tsol/label.h> int getplabel(m_label_t *label_p);
The getplabel() function obtains the sensitivity label of the calling process.
Upon successful completion, getplabel() returns 0. Otherwise it returns -1, label_p is unchanged, and errno is set to indicate the error.
The getplabel() function fails and label_p does not refer to a valid sensitivity label if: EFAULT
label_p points to an invalid address.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |
MT-Level MT-Safe |
ucred_getlabel(3C), libtsol(3LIB), m_label_alloc(3TSOL), m_label_free(3TSOL), attributes(5)
Obtaining a Process Label in Solaris Trusted Extensions Developer's Guide
The functionality described on this manual page is available only if the system is configured with Trusted Extensions.
This function returns different values for system processes than ucred_getlabel(3C) returns.