diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-01-25 18:42:18 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-01-25 18:42:18 +0000 |
commit | cc302d7bf715e769ce11df04ff4f53a584f37860 (patch) | |
tree | 03b4a776b96c7b5751881f718933797cf9a8fd92 /sys/kern | |
parent | 58f738b753e1f4c179f0f3a72a6ea20795342982 (diff) | |
download | FreeBSD-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.c | 3 |
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); |