summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-01-25 18:42:18 +0000
committerrwatson <rwatson@FreeBSD.org>2004-01-25 18:42:18 +0000
commitcc302d7bf715e769ce11df04ff4f53a584f37860 (patch)
tree03b4a776b96c7b5751881f718933797cf9a8fd92 /sys/kern
parent58f738b753e1f4c179f0f3a72a6ea20795342982 (diff)
downloadFreeBSD-src-cc302d7bf715e769ce11df04ff4f53a584f37860.zip
FreeBSD-src-cc302d7bf715e769ce11df04ff4f53a584f37860.tar.gz
When aborting fork() due to a failure, if using MAC, make sure to clean
up the p_label field. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_fork.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 32334b1..445c606 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -737,6 +737,9 @@ fail:
printf("maxproc limit exceeded by uid %i, please see tuning(7) and login.conf(5).\n",
uid);
sx_xunlock(&allproc_lock);
+#ifdef MAC
+ mac_destroy_proc(newproc);
+#endif
uma_zfree(proc_zone, newproc);
if (p1->p_flag & P_SA) {
PROC_LOCK(p1);
OpenPOWER on IntegriCloud