Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jul 2002 12:15:00 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14537 for review
Message-ID:  <200207201915.g6KJF0XT095766@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14537

Change 14537 by rwatson@rwatson_curry on 2002/07/20 12:14:18

	Make sure we zero the operation vector, or the function pointers	
	may appear to be non-null for policies that don't implement
	every entry-point, and all hell will break loose.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#178 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#178 (text+ko) ====

@@ -304,7 +304,7 @@
 	int slot;
 
 	MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
-	    M_WAITOK);
+	    M_WAITOK | M_ZERO);
 	for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
 		switch (mpe->mpe_constant) {
 		case MAC_OP_LAST:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207201915.g6KJF0XT095766>