Date: Thu, 13 Feb 2020 22:16:30 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357886 - in head/sys: kern sys Message-ID: <202002132216.01DMGU1h059742@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002132216.01DMGU1h059742>
