NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | FILES | SEE ALSO | WARNINGS | NOTES | BUGS
#include <tsol/label.h>int labelvers(char **version, const int len);
version may point either to a pointer to pre-allocated memory or to the value (char *)0. If version points to a pointer to pre-allocated memory, then len indicates the size of that memory. If version points to the value (char *)0, memory is allocated using malloc() to contain the label_encodings file version string. The version string from the label_encodings file is copied into the allocated or pre-allocated memory.
labelvers() returns:
If the label_encodings file is inaccessible.
If memory cannot be allocated for the return string or if the pre-allocated return string memory is insufficient to hold the string. The value of the pre-allocated string is set to the NULL string (* version[0] = '\00';).
If successful, the length of the version string including the NULL terminator.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability | SUNWtsu |
MT-Level | MT-Safe |
The label encodings file contains the classification names, words, constraints, and values for the defined labels of this system.
bcltobanner(3), bilconjoin(3), blcompare(3), blinset(3), blmanifest(3), blminmax(3), blportion(3), bltocolor(3), bltos(3), bltype(3), blvalid(3), btohex(3), hextob(3), labelinfo(3), sbltos(3), stobl(3), label_encodings(4)
If the label_encodings file is modified after the version string is obtained, that string may be out of date.
If memory is allocated by this routine, the caller must free memory with free() when the memory is no longer in use.
The label_encodings file is rarely updated on a running system, and there is no way of informing an application that the label_encodings file has been modified.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | FILES | SEE ALSO | WARNINGS | NOTES | BUGS