From 7b9ed9a7938dabb3f9043d87c57bd5aeec0ca542 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 10 Dec 2003 18:48:05 +0000 Subject: [PATCH] interpvnodelabel can be NULL in mac_test_execve_transition(). This only turned up when running mac_test side by side with a transitioning policy such as SEBSD. Make the NULL testing match mac_test_execve_will_transition(), which already tested the vnode label pointer for NULL. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- sys/security/mac_test/mac_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c index ef8c5b3126ba..05f0e8c85a48 100644 --- a/sys/security/mac_test/mac_test.c +++ b/sys/security/mac_test/mac_test.c @@ -1038,7 +1038,9 @@ mac_test_execve_transition(struct ucred *old, struct ucred *new, ASSERT_CRED_LABEL(old->cr_label); ASSERT_CRED_LABEL(new->cr_label); ASSERT_VNODE_LABEL(filelabel); - ASSERT_VNODE_LABEL(interpvnodelabel); + if (interpvnodelabel != NULL) { + ASSERT_VNODE_LABEL(interpvnodelabel); + } if (execlabel != NULL) { ASSERT_CRED_LABEL(execlabel); }