MINT_FROM_TEXT(3C)MINT_FROM_TEXT(3C)NAME
mint_from_text, mint_to_text - convert a MINT string from/to mint_t
SYNOPSIS
#include <sys/mac.h>
mint_t mint_from_text(const char *argp);
char * mint_to_text(mint_t mintp, size_t *len_p);
DESCRIPTION
These routines convert a textual name of a mandatory integrity (MINT)
label from/to a mint_t - a pointer to a structure representing the
mandatory integrity component of a MAC label.
mint_from_text translates a textual description of a MINT label into a
mint_t and returns the result. mint_to_text translates a mint_t into a
character string describing the MINT label. Both of these routines
allocate storage for the information returned. The allocated storage for
both can be released when no longer needed by calling mint_free(3c).
The len_p argument to mint_to_text is a pointer to a size_t that can be
used to hold the length of the returned string. If this argument is not
NULL, then the length of the string is placed in this location on return
from mint_to_text.
RETURN VALUES
If successful, mint_from_text returns a mint_t. Upon failure
mint_from_text returns a NULL pointer - a value of ((mint_t)0).
If successful, mint_to_text returns a pointer to an allocated null
terminated character string containing a representation of the MINT
label. If an error occurs, mint_to_text returns a NULL pointer.
ERRORS
mint_from_text:
EINVAL input text is invalid
ENOMEM could not allocate space for new label
mint_to_text:
EINVAL input label is invalid
ENOMEM could not allocate space for the return string
SEE ALSOmint_dom(3C), mint_equal(3C), mint_free(3C), mint_from_mac(3C)
Page 1