From owner-p4-projects Sat Jul 20 12:15: 9 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F266337B401; Sat, 20 Jul 2002 12:15:05 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81EAC37B400 for ; Sat, 20 Jul 2002 12:15:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F62043E67 for ; Sat, 20 Jul 2002 12:15:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6KJF5JU095783 for ; Sat, 20 Jul 2002 12:15:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6KJF0XT095766 for perforce@freebsd.org; Sat, 20 Jul 2002 12:15:00 -0700 (PDT) Date: Sat, 20 Jul 2002 12:15:00 -0700 (PDT) Message-Id: <200207201915.g6KJF0XT095766@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 14537 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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