mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes
Do this only when the headers for these functionalities were included
prior to this one. Indeed, if they need to be included, style(9)
mandates they should have been so before this one.
Remove the common MAC sysctl declaration from
<security/mac/mac_internal.h>, as it is now redundant (all its includers
also include <security/mac/mac_policy.h>).
Remove local such declarations from all policies' files.
Reviewed by: jamie
Approved by: markj (mentor)
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46903
(cherry picked from commit db33c6f3ae)
The original changes in 'sys/security/mac_grantbylabel/mac_grantbylabel.c' were
removed as MAC/grantbylabel has not been MFCed.
This commit is contained in:
parent
4ccba65f91
commit
62d3e81935
17 changed files with 15 additions and 37 deletions
|
|
@ -56,13 +56,6 @@
|
|||
#include <sys/lock.h>
|
||||
#include <sys/rmlock.h>
|
||||
|
||||
/*
|
||||
* MAC Framework sysctl namespace.
|
||||
*/
|
||||
#ifdef SYSCTL_DECL
|
||||
SYSCTL_DECL(_security_mac);
|
||||
#endif /* SYSCTL_DECL */
|
||||
|
||||
/*
|
||||
* MAC Framework SDT DTrace probe namespace, macros for declaring entry
|
||||
* point probes, macros for invoking them.
|
||||
|
|
|
|||
|
|
@ -1064,4 +1064,19 @@ int mac_policy_modevent(module_t mod, int type, void *data);
|
|||
intptr_t mac_label_get(struct label *l, int slot);
|
||||
void mac_label_set(struct label *l, int slot, intptr_t v);
|
||||
|
||||
/*
|
||||
* Common MAC Framework's sysctl and jail parameters' sysctl nodes' declarations.
|
||||
*
|
||||
* Headers <sys/jail.h> and <sys/sysctl.h> normally have to be included before
|
||||
* this header as style(9) hints to. If they weren't, just forego the
|
||||
* corresponding declarations, assuming they are not needed.
|
||||
*/
|
||||
#ifdef SYSCTL_DECL
|
||||
SYSCTL_DECL(_security_mac);
|
||||
#endif
|
||||
|
||||
#ifdef SYSCTL_JAIL_PARAM_DECL
|
||||
SYSCTL_JAIL_PARAM_DECL(mac);
|
||||
#endif
|
||||
|
||||
#endif /* !_SECURITY_MAC_MAC_POLICY_H_ */
|
||||
|
|
|
|||
|
|
@ -88,8 +88,6 @@
|
|||
#include <security/mac/mac_policy.h>
|
||||
#include <security/mac_biba/mac_biba.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, biba,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_biba policy controls");
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@
|
|||
|
||||
static struct mtx ugidfw_mtx;
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, bsdextended,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD extended BSD MAC policy controls");
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, ifoff,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_ifoff policy controls");
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, ipacl, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_ipacl policy controls");
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,6 @@ struct mac_lomac_proc {
|
|||
struct mtx mtx;
|
||||
};
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, lomac,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_lomac policy controls");
|
||||
|
|
|
|||
|
|
@ -89,8 +89,6 @@
|
|||
#include <security/mac/mac_policy.h>
|
||||
#include <security/mac_mls/mac_mls.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, mls,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_mls policy controls");
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, ntpd,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"mac_ntpd policy controls");
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@
|
|||
#include <security/mac/mac_policy.h>
|
||||
#include <security/mac_partition/mac_partition.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, partition,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_partition policy controls");
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, pimd,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"mac_pimd policy controls");
|
||||
|
|
|
|||
|
|
@ -79,8 +79,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, portacl,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_portacl policy controls");
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, priority,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"mac_priority policy controls");
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, seeotheruids,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_seeotheruids policy controls");
|
||||
|
|
|
|||
|
|
@ -88,8 +88,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, stub,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_stub policy controls");
|
||||
|
|
|
|||
|
|
@ -78,8 +78,6 @@
|
|||
|
||||
#include <security/mac/mac_policy.h>
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
static SYSCTL_NODE(_security_mac, OID_AUTO, test,
|
||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"TrustedBSD mac_test policy controls");
|
||||
|
|
|
|||
|
|
@ -81,8 +81,6 @@ static int sysctl_mac_veriexec_state(SYSCTL_HANDLER_ARGS);
|
|||
static int sysctl_mac_veriexec_db(SYSCTL_HANDLER_ARGS);
|
||||
static struct mac_policy_ops mac_veriexec_ops;
|
||||
|
||||
SYSCTL_DECL(_security_mac);
|
||||
|
||||
SYSCTL_NODE(_security_mac, OID_AUTO, veriexec, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
|
||||
"MAC/veriexec policy controls");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue