From owner-p4-projects@FreeBSD.ORG Tue Feb 10 06:46:24 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FFBB16A4D1; Tue, 10 Feb 2004 06:46:24 -0800 (PST) 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 077C416A4CE for ; Tue, 10 Feb 2004 06:46:24 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0356C43D2F for ; Tue, 10 Feb 2004 06:46:24 -0800 (PST) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1AEkNGe065221 for ; Tue, 10 Feb 2004 06:46:23 -0800 (PST) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1AEkN4w065218 for perforce@freebsd.org; Tue, 10 Feb 2004 06:46:23 -0800 (PST) (envelope-from areisse@nailabs.com) Date: Tue, 10 Feb 2004 06:46:23 -0800 (PST) Message-Id: <200402101446.i1AEkN4w065218@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 46748 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 14:46:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=46748 Change 46748 by areisse@areisse_ibook on 2004/02/10 06:45:47 Fix for using more than 1 preload at a time start sebsd in enforcing mode with "kenv_sebsd_enforce=1" Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/osfmk/ppc/ppc_init.c#3 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/osfmk/ppc/ppc_init.c#3 (text+ko) ==== @@ -115,9 +115,10 @@ int *exp = boot_exdata; while (rlen > 0) { + size_t esize = (exp[0] + sizeof (int) * 5 + 0xfff) & ~0xfff; if (strcmp ((char *) (exp + 1), name)) { - rlen -= exp[0]; - exp = (int *) (((char*)exp) + exp[0]); + rlen -= esize; + exp = (int *) (((char*)exp) + esize); } else { *size = exp[0]; ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.c#7 (text+ko) ==== @@ -151,8 +151,12 @@ mtx_init(&avc_lock, "SEBSD AVC", NULL, MTX_DEF); mtx_init(&avc_log_lock, "SEBSD message lock", NULL, MTX_DEF); - /* The fetch may or may not occur; if not, it doesn't change int *. */ - TUNABLE_INT_FETCH("security.mac.sebsd.enforcing", &selinux_enforcing); + size_t evsize; + char *ev; + if (preload_find_data ("sebsd_enforce", &evsize, &ev)) { + if (evsize > 0 && ev[0] == '1') + selinux_enforcing = 1; + } } #if 0