diff options
Diffstat (limited to 'sys/kern/kern_jail.c')
| -rw-r--r-- | sys/kern/kern_jail.c | 20 | 
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 8dbe2d6f5db6..222d36e2b268 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2821,16 +2821,6 @@ prison_ischild(struct prison *pr1, struct prison *pr2)  }  /* - * Return 1 if the passed credential is in a jail, otherwise 0. - */ -int -jailed(struct ucred *cred) -{ - -	return (cred->cr_prison != &prison0); -} - -/*   * Return 1 if the passed credential is in a jail and that jail does not   * have its own virtual network stack, otherwise 0.   */ @@ -3008,6 +2998,16 @@ int  prison_priv_check(struct ucred *cred, int priv)  { +	/* +	 * Some policies have custom handlers. This routine should not be +	 * called for them. See priv_check_cred(). +	 */ +	switch (priv) { +	case PRIV_VFS_GENERATION: +		KASSERT(0, ("prison_priv_check instead of a custom handler " +		    "called for %d\n", priv)); +	} +  	if (!jailed(cred))  		return (0);  | 
