Comment LABEL_TO_SLOT() macro, including observing that we'd like to improve
this policy API to avoid encoding struct label binary layout in policy modules. Obtained from: TrustedBSD Project
This commit is contained in:
parent
19d0ec0330
commit
8425ae1208
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165429
@ -948,6 +948,14 @@ struct mac_policy_conf {
|
||||
|
||||
int mac_policy_modevent(module_t mod, int type, void *data);
|
||||
|
||||
/*
|
||||
* Policy interface to map a struct label pointer to per-policy data.
|
||||
* Typically, policies wrap this in their own accessor macro that casts a
|
||||
* void pointer to a policy-specific data type.
|
||||
*
|
||||
* XXXRW: It might be preferable to provide get/set methods via functions to
|
||||
* avoid encoding the struct label layout in compiled modules.
|
||||
*/
|
||||
#define LABEL_TO_SLOT(l, s) (l)->l_perpolicy[s]
|
||||
|
||||
#endif /* !_SYS_MAC_POLICY_H_ */
|
||||
|
@ -948,6 +948,14 @@ struct mac_policy_conf {
|
||||
|
||||
int mac_policy_modevent(module_t mod, int type, void *data);
|
||||
|
||||
/*
|
||||
* Policy interface to map a struct label pointer to per-policy data.
|
||||
* Typically, policies wrap this in their own accessor macro that casts a
|
||||
* void pointer to a policy-specific data type.
|
||||
*
|
||||
* XXXRW: It might be preferable to provide get/set methods via functions to
|
||||
* avoid encoding the struct label layout in compiled modules.
|
||||
*/
|
||||
#define LABEL_TO_SLOT(l, s) (l)->l_perpolicy[s]
|
||||
|
||||
#endif /* !_SYS_MAC_POLICY_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user