From owner-p4-projects@FreeBSD.ORG Sat May 31 15:27:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4908837B404; Sat, 31 May 2003 15:27:37 -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 D891B37B401 for ; Sat, 31 May 2003 15:27:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D0E143F3F for ; Sat, 31 May 2003 15:27:36 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4VMRa0U047551 for ; Sat, 31 May 2003 15:27:36 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4VMRa5O047548 for perforce@freebsd.org; Sat, 31 May 2003 15:27:36 -0700 (PDT) Date: Sat, 31 May 2003 15:27:36 -0700 (PDT) Message-Id: <200305312227.h4VMRa5O047548@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 32235 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: Sat, 31 May 2003 22:27:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=32235 Change 32235 by rwatson@rwatson_tislabs on 2003/05/31 15:27:22 Interpreter label may be null for exec. file_cred may be null for read, stat under various circumstances (linker loads, lstat, etc). write may also be in this category for core dumps. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#104 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#104 (text+ko) ==== @@ -967,7 +967,9 @@ ASSERT_CRED_LABEL(&old->cr_label); ASSERT_VNODE_LABEL(filelabel); - ASSERT_VNODE_LABEL(interpvnodelabel); + if (interpvnodelabel != NULL) { + ASSERT_VNODE_LABEL(interpvnodelabel); + } if (execlabel != NULL) { ASSERT_CRED_LABEL(execlabel); } @@ -1565,7 +1567,9 @@ { ASSERT_CRED_LABEL(&active_cred->cr_label); - ASSERT_CRED_LABEL(&file_cred->cr_label); + if (file_cred != NULL) { + ASSERT_CRED_LABEL(&file_cred->cr_label); + } ASSERT_VNODE_LABEL(label); return (0); @@ -1717,7 +1721,9 @@ { ASSERT_CRED_LABEL(&active_cred->cr_label); - ASSERT_CRED_LABEL(&file_cred->cr_label); + if (file_cred != NULL) { + ASSERT_CRED_LABEL(&file_cred->cr_label); + } ASSERT_VNODE_LABEL(label); return (0);