From 02297e8cb30233b906e7d43bfb75a79492207ab3 Mon Sep 17 00:00:00 2001 From: rwatson Date: Wed, 10 Dec 2003 18:48:05 +0000 Subject: 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(-) (limited to 'sys/security') diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c index ef8c5b3..05f0e8c 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); } -- cgit v1.1