以 PDF 格式下载本书 (1789 KB)
label_to_str(3TSOL)Name | Synopsis | Description | Return Values | Errors | Attributes | See Also | Warnings | Notes Name
Synopsiscc [flag...] file... -ltsol [library...] #include <tsol/label.h>
int label_to_str(const m_label_t *label, char **string,
const m_label_str_t conversion_type, uint_t flags);
Description
label_to_str() is a simple function to convert various mandatory label types to human readable strings. label is the mandatory label to convert. string points to memory that is allocated by label_to_str() that contains the converted string. The caller is responsible for calling free(3C) to free allocated memory. The calling process must have mandatory read access to the resulting human readable string. Or the calling process must have the sys_trans_label privilege. The conversion_type parameter controls the type of label conversion. Not all types of conversion are valid for all types of label: The flags parameter provides a hint to the label conversion: Return ValuesUpon successful completion, the label_to_str() function returns 0. Otherwise, -1 is returned, errno is set to indicate the error and the string pointer is set to NULL. Errors
The label_to_str() function will fail if: AttributesSee attributes(5) for descriptions of the following attributes:
The label_to_str() function is Committed. The returned string is Not-an-Interface and is dependent on the specific label_encodings file. The conversion type INTERNAL is Uncommitted, but is always accepted as input to str_to_label(3TSOL). Conversion types that are relative to the DIA encodings schema are Standard. Standard is specified in label_encodings(4). See Alsofree(3C), libtsol(3LIB), str_to_label(3TSOL), label_encodings(4), attributes(5), labels(5) Using the label_to_str Function in Solaris Trusted Extensions Developer’s Guide WarningsA number of these conversions rely on the DIA label encodings schema. They might not be valid for other label schemata. NotesThe functionality described on this manual page is available only if the system is configured with Trusted Extensions. Name | Synopsis | Description | Return Values | Errors | Attributes | See Also | Warnings | Notes |
|||||||||