mac_data.h Reference

Declared in
mac_data.h

Overview

Data Types

See the Overview section above for header-level documentation.

mac_module_data_element

Mac policy module data

struct mac_module_data_element {
   unsigned int key_size;
   unsigned int value_size;
   unsigned int value_type;
   char *key;
   char *value;
};
Discussion

This structure specifies module data that is passed in to the TrustedBSD MAC policy module by the kernel module loader. The data is made of up key/value pairs where the key is always a string and the value is a string, binary data or array. An array may be a list of values (actually a similar set of key/value pairs, but in this case the keys are always null), and may also consist of a set of dictionaries, which in turn are made up of a list of key/value pairs.

Module data may be specified in the MAC policy module's Info.plist file as part of the OSModuleData dictionary.

E.g.

<key>OSModuleData<key> <dict> <key>foo<key> <string>bar<string> <key>Beers<key> <array> <dict> <key>type<key> <string>lager<string> <key>Name<key> <string>Anchor Steam<string> <dict> <dict> <key>type<key> <string>ale<string> <key>Name<key> <string>Sierra Nevada Pale Ale<string> <dict> <array> <dict>

Availability
  • Available in OS X v10.6 and later.
Declared In
mac_data.h