diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2020-09-04 22:25:14 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2020-09-04 22:25:14 +0000 |
commit | eac7052fdebb90caf2f653e06187bdbca837b9c7 (patch) | |
tree | 7239679d0ef872f6768f57c2ae6e6db54576013d /sys/contrib/openzfs/include/os/freebsd/spl | |
parent | 46b974a9dbc08c432385b68092b7e34b683c38e1 (diff) | |
parent | b0a96e5e2d3c9480ec89dd4c034c7fe4f97abfe1 (diff) | |
download | src-eac7052fdebb90caf2f653e06187bdbca837b9c7.tar.gz src-eac7052fdebb90caf2f653e06187bdbca837b9c7.zip |
ZFS: MFV 2.0-rc1-gfd20a8
- fixes jail delegation
- fixes raw kstat unsupported complaints
- exposes dbgmsg, dbuf, and checksum benchmark stats
- restore rename -u support
Notes
Notes:
svn path=/head/; revision=365347
Diffstat (limited to 'sys/contrib/openzfs/include/os/freebsd/spl')
-rw-r--r-- | sys/contrib/openzfs/include/os/freebsd/spl/sys/cred.h | 2 | ||||
-rw-r--r-- | sys/contrib/openzfs/include/os/freebsd/spl/sys/zone.h | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/cred.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/cred.h index e32910e0efab..86f79011d6da 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/cred.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/cred.h @@ -93,7 +93,7 @@ extern cred_t *zone_kcred(void); extern gid_t crgetrgid(const cred_t *); extern gid_t crgetsgid(const cred_t *); -#define crgetzoneid(x) (0) +#define crgetzoneid(cr) ((cr)->cr_prison->pr_id) extern projid_t crgetprojid(const cred_t *); extern cred_t *crgetmapped(const cred_t *); diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/zone.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/zone.h index 71a28adaf26e..dd088de836d3 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/zone.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/zone.h @@ -29,6 +29,8 @@ #ifndef _OPENSOLARIS_SYS_ZONE_H_ #define _OPENSOLARIS_SYS_ZONE_H_ +#include <sys/jail.h> + /* * Macros to help with zone visibility restrictions. */ @@ -36,12 +38,9 @@ #define GLOBAL_ZONEID 0 /* - * Is thread in the global zone? + * Is proc in the global zone? */ -#define INGLOBALZONE(p) in_globalzone((p)) - - -extern boolean_t in_globalzone(struct proc *); +#define INGLOBALZONE(proc) (!jailed((proc)->p_ucred)) /* * Attach the given dataset to the given jail. |