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

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



NAME    [Toc]    [Back]

     mac_prepare, mac_prepare_type, mac_prepare_file_label,
     mac_prepare_ifnet_label, mac_prepare_process_label -- allocate appropriate
 storage for mac_t

SYNOPSIS    [Toc]    [Back]

     #include <sys/mac.h>

     mac_prepare(mac_t *mac, const char *elements);

     mac_prepare_type(mac_t *mac, const char *name);

     mac_prepare_file_label(mac_t *mac);

     mac_prepare_ifnet_label(mac_t *mac);

     mac_prepare_process_label(mac_t *mac);

DESCRIPTION    [Toc]    [Back]

     The mac_prepare family of functions allocates the appropriate amount of
     storage and initializes *mac for use by mac_get(3).  When the resulting
     label is passed into the mac_get(3) functions, the kernel will attempt to
     fill in the label elements specified when the label was prepared.	Elements
 are specified in a nul-terminate string, using commas to delimit
     fields.  Element names may be prefixed with the ?	character to indicate
     that a failure by the kernel to retrieve that element should not be considered

     The mac_prepare() function accepts a list of policy names as a parameter,
     and allocates the storage to fit those label elements accordingly.  The
     remaining functions in the family make use of system defaults defined in
     mac.conf(5) instead of an explicit elements argument, deriving the
     default from the specified object type.

     mac_prepare_type() allocates the storage to fit an object label of the
     type specified by the name argument.  The mac_prepare_file_label(),
     mac_prepare_ifnet_label(), and mac_prepare_process_label() functions are
     equivilent to invocations of mac_prepare_type() with arguments of "file",
     "ifnet", and "process" respectively.

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, the value 0 is returned; otherwise the
     value -1 is returned and the global variable errno is set to indicate the

SEE ALSO    [Toc]    [Back]

     mac(3), mac_free(3), mac_get(3), mac_is_present_np(3), mac_set(3),
     mac(4), mac.conf(5), 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.  Support for generic object types first
     appeared in FreeBSD 5.2.

FreeBSD 5.2.1			August 22, 2003 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
acl_init Tru64 Allocate and initialize ACL internal working storage
tt_malloc HP-UX allocate storage on the ToolTalk API allocation stack
msen_from_mac IRIX extract a sensitivity label from a mac_t
mac_from_text IRIX convert a POSIX MAC string from/to mac_t
mint_from_mac IRIX extract a sensitivity label from a mac_t
mac_from_msen IRIX convert independent sensitivity or integrity labels to mac_t
volunmigrate Tru64 Moves AdvFS domain storage from physical storage to LSM volumes (volmigrate) or from LSM volumes to ...
volmigrate Tru64 Moves AdvFS domain storage from physical storage to LSM volumes (volmigrate) or from LSM volumes to ...
RSA_new OpenBSD allocate and free RSA objects
RSA_free OpenBSD allocate and free RSA objects
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service