From 7e440242e56a4bd0944ec22a98cdc07cb3f0ad10 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 14 Feb 2004 18:52:43 +0000 Subject: [PATCH] Fix mismerge in last commit: check that cred->cr_prison is NULL before dereferencing the prison pointer. --- sys/kern/kern_jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 8d19dcb9c7b4..94ac0aae4633 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -431,7 +431,7 @@ int prison_check_mount(struct ucred *cred, struct mount *mp) { - if (jail_getfsstatroot_only) { + if (jail_getfsstatroot_only && cred->cr_prison != NULL) { if (cred->cr_prison->pr_root->v_mount != mp) return (0); }