aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/freebsd/spl/sys
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-09-04 21:31:58 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-09-04 21:31:58 +0000
commit431004027d028e7e689b171c442e6f1c384205c6 (patch)
tree6cf42660d552d2264586ffc9e69020ae6a604f1f /include/os/freebsd/spl/sys
parent93ddd0259dd285fbac5cc5086a039a22f1b046a1 (diff)
downloadsrc-431004027d028e7e689b171c442e6f1c384205c6.tar.gz
src-431004027d028e7e689b171c442e6f1c384205c6.zip
Update vendor openzfs to fd20a8vendor/openzfs/2.0-rc1-gfd20a8
Notes
Notes: svn path=/vendor-sys/openzfs/dist/; revision=365340 svn path=/vendor-sys/openzfs/2.0-rc1-gfd20a8/; revision=365341; tag=vendor/openzfs/2.0-rc1-gfd20a8
Diffstat (limited to 'include/os/freebsd/spl/sys')
-rw-r--r--include/os/freebsd/spl/sys/cred.h2
-rw-r--r--include/os/freebsd/spl/sys/zone.h9
2 files changed, 5 insertions, 6 deletions
diff --git a/include/os/freebsd/spl/sys/cred.h b/include/os/freebsd/spl/sys/cred.h
index e32910e0efab..86f79011d6da 100644
--- a/include/os/freebsd/spl/sys/cred.h
+++ b/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/include/os/freebsd/spl/sys/zone.h b/include/os/freebsd/spl/sys/zone.h
index 71a28adaf26e..dd088de836d3 100644
--- a/include/os/freebsd/spl/sys/zone.h
+++ b/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.