label.h revision bd6f16401fad6aa1309b1415c995fe7394dff03a
/*
* CDDL HEADER START
*
* 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
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_TSOL_LABEL_H
#define _SYS_TSOL_LABEL_H
#ifdef _KERNEL
#endif /* _KERNEL */
#ifdef __cplusplus
extern "C" {
#endif
/*
* types of label comparison
*/
#define EQUALITY_CHECK 0
#define DOMINANCE_CHECK 1
/* Binary Label Structure Definitions */
typedef struct _mac_label_impl m_label_t;
bslabel_t, /* Sensitivity Label */
bclear_t; /* Clearance */
typedef struct _tsol_binary_level_lrange { /* Level Range */
} m_range_t;
typedef struct tsol_mlp_s {
} tsol_mlp_t;
/* Procedure Interface Definitions available to user and kernel */
extern void bclearhigh(m_label_t *);
extern void bclearundef(m_label_t *);
extern boolean_t bisinvalid(const void *);
#ifdef _KERNEL
typedef struct tsol_mlp_entry_s {
typedef struct tsol_mlp_list_s {
typedef struct ts_label_s {
} ts_label_t;
#define DEFAULT_DOI 1
extern ts_label_t *l_admin_low;
extern ts_label_t *l_admin_high;
extern uint32_t default_doi;
extern int sys_labeling;
extern void label_init(void);
extern void label_hold(ts_label_t *);
extern void label_rele(ts_label_t *);
uint32_t, int);
int);
/*
* The use of '!!' here prevents users from referencing this function-like
* macro as though it were an l-value, and in normal use is optimized away
* by the compiler.
*/
#define is_system_labeled() (!!(sys_labeling > 0))
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_TSOL_LABEL_H */