Author: mjg Date: Thu Feb 13 22:16:30 2020 New Revision: 357886 URL: https://svnweb.freebsd.org/changeset/base/357886
Log: Inline jailed(). It is constantly called from priv_check. Modified: head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Feb 13 22:16:02 2020 (r357885) +++ head/sys/kern/kern_jail.c Thu Feb 13 22:16:30 2020 (r357886) @@ -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. */ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Thu Feb 13 22:16:02 2020 (r357885) +++ head/sys/sys/jail.h Thu Feb 13 22:16:30 2020 (r357886) @@ -369,7 +369,12 @@ struct mount; struct sockaddr; struct statfs; struct vfsconf; -int jailed(struct ucred *cred); + +/* + * Return 1 if the passed credential is in a jail, otherwise 0. + */ +#define jailed(cred) (cred->cr_prison != &prison0) + int jailed_without_vnet(struct ucred *); void getcredhostname(struct ucred *, char *, size_t); void getcreddomainname(struct ucred *, char *, size_t); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"