diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-11-29 14:32:14 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2008-11-29 14:32:14 +0000 |
| commit | 413628a7e3d23a897cd959638d325395e4c9691b (patch) | |
| tree | 2b8f4835032d12a0e61cc40dad151e279cf7a49f /sys/kern/kern_fork.c | |
| parent | f0f4475a13fe3545c10e9b3e8c69679c4abfb1b3 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_fork.c')
| -rw-r--r-- | sys/kern/kern_fork.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 673913b6fa84..96dd9c8fbd3c 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/priv.h> #include <sys/proc.h> +#include <sys/jail.h> #include <sys/pioctl.h> #include <sys/resourcevar.h> #include <sys/sched.h> @@ -452,6 +453,11 @@ again: __rangeof(struct proc, p_startzero, p_endzero)); p2->p_ucred = crhold(td->td_ucred); + + /* In case we are jailed tell the prison that we exist. */ + if (jailed(p2->p_ucred)) + prison_proc_hold(p2->p_ucred->cr_prison); + PROC_UNLOCK(p2); /* |
