diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-12-05 01:22:03 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-12-05 01:22:03 +0000 |
commit | 36f039142a2c8f0a5141e707c0316f3b47bd10bb (patch) | |
tree | 963bf535b33dd5ad6037b252f5b2edbb2fb3e661 /sys/kern/kern_conf.c | |
parent | a3cd956d3555d2d317400423daffecd9ec2d2753 (diff) | |
download | FreeBSD-src-36f039142a2c8f0a5141e707c0316f3b47bd10bb.zip FreeBSD-src-36f039142a2c8f0a5141e707c0316f3b47bd10bb.tar.gz |
Apply a workaround for the unkillable jail problem where some devices created
within the jail are never freed. si_cred is only used by the MAC framework so
make the cred reference conditional on it being compiled in, this is not a fix
and will need to be reviewed for any new consumers of si_cred.
This will quell some user complaint when using jails with a default kernel.
Reviewed by: rwatson
MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index c2b8fbf..1cc8a15 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -608,9 +608,11 @@ make_dev_credv(int flags, struct cdevsw *devsw, int minornr, } dev->si_flags |= SI_NAMED; +#ifdef MAC if (cr != NULL) dev->si_cred = crhold(cr); else +#endif dev->si_cred = NULL; dev->si_uid = uid; dev->si_gid = gid; |