diff options
author | Ryan Moeller <[email protected]> | 2020-08-29 18:25:56 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-08-31 19:42:26 -0700 |
commit | 2f65c7a608520f5907eddca0a732b0a995cb0a86 (patch) | |
tree | fcbc67eae05ec64670b2f125a4ce286d1bea3b9b | |
parent | 1144586b57350f0f850d2428dccf7c80cbaa7485 (diff) |
FreeBSD: Define crgetzoneid appropriately
The previous ZFS implementation on FreeBSD had ifdefs to use jailed()
instead of crgetzoneid() in dsl_dir.c, however we can simply provide an
appropriate definition of crgetzoneid for the same effect.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10851
-rw-r--r-- | include/os/freebsd/spl/sys/cred.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/os/freebsd/spl/sys/cred.h b/include/os/freebsd/spl/sys/cred.h index e32910e0e..86f79011d 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 *); |