:man| Alphabetical   Categories   About us 
 
MAC_TEXT (3) | C library functions | Unix Manual Pages | :man

NAME

mac_from_text, mac_to_text - convert MAC label to/from text representation

CONTENTS

Library
Synopsis
Description
Return Values
Compatibility
Errors
See Also
Standards
History

LIBRARY


.Lb libc

SYNOPSIS


.In sys/mac.h int mac_from_text "mac_t *mac" "const char *text" int mac_to_text "mac_t label" "char **text"

DESCRIPTION

The mac_from_text function converts the text representation of a label into the internal policy label format (Vt mac_t) and places it in *mac, which must later be freed with free(3).

The mac_to_text function allocates storage for *text, which will be set to the text representation of label.

Refer to maclabel(7) for the MAC label format.

RETURN VALUES


.Rv -std mac_from_text mac_to_text

COMPATIBILITY

POSIX.1e does not define a format for text representations of MAC labels.

POSIX.1e requires that text strings allocated using mac_to_text be freed using mac_free(3); in the
.Fx implementation, they must be freed using free(3), as mac_free(3) is used only to free memory used for type
.Vt mac_t .

ERRORS

[ENOMEM]
Insufficient memory was available to allocate internal storage.

SEE ALSO

free(3), mac(3), mac_get(3), mac_is_present_np(3), mac_prepare(3), mac_set(3), mac(4), maclabel(7)

STANDARDS

HISTORY

 
Created by Blin Media, 2008-2013