2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * Miscellaneous user interfaces to trusted label functions. 2N/A * blinset - Check in a label set. 2N/A * Entry label = Sensitivity Label to check. 2N/A * id = Label set identifier of set to check. 2N/A * Returns -1, If label set unavailable, or server failure. 2N/A * 0, If label not in label set. 2N/A * 1, If label is in the label set. 2N/A * Calls __call_labeld(BLINSET), BLTYPE, BSLLOW, BSLHIGH. 2N/A /* initialize static labels. */ 2N/A * Only System and User Accreditation Ranges presently 2N/A * bslvalid - Check Sensitivity Label for validity. 2N/A * Entry label = Sensitivity Label to check. 2N/A * Returns -1, If unable to access label encodings file, or server failure. 2N/A * 0, If label not valid. 2N/A * 1, If label is valid. 2N/A * Calls __call_labeld(BSLVALID), BLTYPE, BSLLOW, BSLHIGH. 2N/A /* initialize static labels. */ 2N/A * bclearvalid - Check Clearance for validity. 2N/A * Entry clearance = Clearance to check. 2N/A * Returns -1, If unable to access label encodings file, or server failure. 2N/A * 0, If label not valid. 2N/A * 1, If label is valid. 2N/A * Calls __call_labeld(BCLEARVALID), BLTYPE, BCLEARLOW, BCLEARHIGH. 2N/A /* initialize static labels. */ 2N/A * labelinfo - Get information about the label encodings file. 2N/A * Entry info = Address of label_info structure to update. 2N/A * Exit info = Updated. 2N/A * Returns -1, If unable to access label encodings file, or server failure. 2N/A * Calls __call_labeld(LABELINFO). 2N/A * labelvers - Get version string of the label encodings file. 2N/A * Entry version = Address of string pointer to return. 2N/A * len = Length of string if pre-allocated. 2N/A * Exit version = Updated. 2N/A * Returns -1, If unable to access label encodings file, or server failure. 2N/A * 0, If unable to allocate version string, 2N/A * or pre-allocated version string to short 2N/A * (and **version = '\0'). 2N/A * length (including null) of version string, If successful. 2N/A * Calls __call_labeld(LABELVERS) 2N/A /* release return buffer */ 2N/A /* release return buffer */ 2N/A /* release return buffer */ 2N/A /* release return buffer */ 2N/A * bltocolor - get ASCII color name of label. 2N/A * Entry label = Sensitivity Level of color to get. 2N/A * size = Size of the color_name array. 2N/A * color_name = Storage for ASCII color name string to be returned. 2N/A * Returns NULL, If error (label encodings file not accessible, 2N/A * invalid label, no color for this label). 2N/A * Address of color_name parameter containing ASCII color name 2N/A * defined for the label. 2N/A * Calls __call_labeld(BLTOCOLOR), strlen. 2N/A /* release return buffer */ 2N/A /* release return buffer */ 2N/A * bltocolor - get ASCII color name of label. 2N/A * Entry label = Sensitivity Level of color to get. 2N/A * Returns NULL, If error (label encodings file not accessible, 2N/A * invalid label, no color for this label). 2N/A * Address of statically allocated string containing ASCII 2N/A * color name defined for the classification contained 2N/A * Calls bltocolor_r. 2N/A * getuserrange - get label range for user 2N/A * Entry username of user 2N/A * Returns NULL, If memory allocation failure or userdefs failure. 2N/A * otherwise returns the allocates m_range_t with the 2N/A * user's min and max labels set. 2N/A /* If the user has an explicit min_label or clearance, use it. */ 2N/A /* Need to use system default clearance and/or min_label */