*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> mac_text (3)              



NAME    [Toc]    [Back]

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

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/mac.h>

     mac_from_text(mac_t *mac, const char *text);

     mac_to_text(mac_t label, char **text);

DESCRIPTION    [Toc]    [Back]

     The mac_from_text() function converts the text representation of a label
     into the internal policy label format (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    [Toc]    [Back]

     The mac_from_text() and mac_to_text() functions return the value 0 if
     successful; otherwise the value -1 is returned and the global variable
     errno is set to indicate the error.

COMPATIBILITY    [Toc]    [Back]

     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 FreeBSD implementation, they must be
     freed using free(3), as mac_free(3) is used only to free memory used for
     type mac_t.

ERRORS    [Toc]    [Back]

     [ENOMEM]		Insufficient memory was available to allocate internal

SEE ALSO    [Toc]    [Back]

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

STANDARDS    [Toc]    [Back]

     POSIX.1e is described in IEEE POSIX.1e draft 17.  Discussion of the draft
     continues on the cross-platform POSIX.1e implementation mailing list.  To
     join this list, see the FreeBSD POSIX.1e implementation page for more

HISTORY    [Toc]    [Back]

     Support for Mandatory Access Control was introduced in FreeBSD 5.0 as
     part of the TrustedBSD Project.

FreeBSD 5.2.1		       December 21, 2001		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
bsde_rule_to_string FreeBSD convert a ugidfw rule into its text representation
i2d_SSL_SESSION OpenBSD convert SSL_SESSION object from/to ASN1 representation
d2i_SSL_SESSION NetBSD convert SSL_SESSION object from/to ASN1 representation
d2i_SSL_SESSION OpenBSD convert SSL_SESSION object from/to ASN1 representation
i2d_SSL_SESSION Tru64 Convert SSL_SESSION object to or from ASN1 representation
d2i_SSL_SESSION Tru64 Convert SSL_SESSION object to or from ASN1 representation
acl_to_text FreeBSD convert an ACL to text
pr Linux convert text files for printing
gss_import_name Tru64 Convert text name to internal form name.
gss_display_status Tru64 Convert GSS-API return codes to text.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service