Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MAC_PREPARE(3)		 BSD Library Functions Manual		MAC_PREPARE(3)

NAME
     mac_prepare -- allocate appropriate storage for mac_t

SYNOPSIS
     #include <sys/mac.h>

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

     int
     mac_prepare_file_label(mac_t *mac);

     int
     mac_prepare_ifnet_label(mac_t *mac);

     int
     mac_prepare_process_label(mac_t *mac);

DESCRIPTION
     The mac_prepare family of functions allocates the appropriate amount of
     storage and initializes *mac for use by mac_get(3).

     The mac_prepare() function	accepts	a list of policy names as a parameter
     and allocates the storage to fit those label elements accordingly.

     The mac_prepare_file_label(), mac_prepare_ifnet_label(), and
     mac_prepare_process_label() functions allocate the	storage	to fit file,
     network interface,	and process labels, respectively.

RETURN VALUES
     The mac_prepare(),	mac_prepare_file_label(), mac_prepare_ifnet_label(),
     and mac_prepare_process_label() functions return the value	0 if success-
     ful; otherwise the	value -1 is returned and the global variable errno is
     set to indicate the error.

SEE ALSO
     mac(3), mac_free(3), mac_get(3), mac_is_present_np(3), mac_set(3),
     mac(4), maclabel(7)

STANDARDS
     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 in-
     formation.

BSD			       DECEMBER	12, 2002			   BSD

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO | STANDARDS

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mac_prepare&sektion=3&manpath=FreeBSD+5.0-RELEASE>

home | help