PERFORCE change 91529 for review
Robert Watson
rwatson at FreeBSD.org
Sat Feb 11 00:21:59 GMT 2006
http://perforce.freebsd.org/chv.cgi?CH=91529
Change 91529 by rwatson at rwatson_zoo on 2006/02/11 00:21:20
Temporarily remove ABI versioning code from module registration;
keep API version number.
Requested by: sbahra
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#452 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#241 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#452 (text+ko) ====
@@ -96,21 +96,10 @@
#ifdef MAC
-/*-
- * The TrustedBSD MAC Framework declares two version numbers in support of
- * policy modules:
- *
- * - A linker version number, which declares the version of the MAC policy
- * ABI.
- *
- * - A feature version number, relative to the linker version, which declares
- * what if any optional features for the linker version are present. This
- * supports the incremental addition of features in a FreeBSD RELENG
- * branch.
- *
- * Modules will be unable to load if they do not match the current linker
- * version due to ABI compatibility concerns. They may also test for support
- * for specific API features that they depend on.
+/*
+ * Declare that the kernel provides MAC support, version 1. This permits
+ * modules to refuse to be loaded if the necessary support isn't present,
+ * even if it's pre-boot.
*/
MODULE_VERSION(kernel_mac_support, 3);
@@ -392,14 +381,6 @@
error = EBUSY;
break;
}
- if (mac_version < mpc->mpc_depend_version) {
- printf("mac_policy_modevent: %s policy requires "
- "MAC version %d\n", mpc->mpc_name,
- mpc->mpc_depend_version);
- error = ENOTSUP;
- break;
- }
-
error = mac_policy_register(mpc);
break;
case MOD_UNLOAD:
==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#241 (text+ko) ====
@@ -624,7 +624,6 @@
int mpc_loadtime_flags; /* flags */
int *mpc_field_off; /* security field */
int mpc_runtime_flags; /* flags */
- int mpc_depend_version; /* required MAC */
LIST_ENTRY(mac_policy_conf) mpc_list; /* global list */
};
@@ -636,10 +635,6 @@
/* Flags for the mpc_runtime_flags field. */
#define MPC_RUNTIME_FLAG_REGISTERED 0x00000001
-/* This must be defined after MAC_POLICY_SET. */
-#define MAC_DEPEND_VERSION(mpname, version) \
- mpname##_mac_policy_conf.mpc_depend_version = version;
-
#define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted) \
static struct mac_policy_conf mpname##_mac_policy_conf = { \
#mpname, \
@@ -648,7 +643,6 @@
mpflags, \
privdata_wanted, \
0, \
- 0, \
}; \
static moduledata_t mpname##_mod = { \
#mpname, \
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list