aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/os
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-12-11 11:58:37 -0800
committerBrian Behlendorf <[email protected]>2019-12-11 11:58:37 -0800
commit4bc721965ff272ad59c6e8a130a544e1e2c01b34 (patch)
tree0a177852b0609de4e6dc19a4ec73ec1c3e7e382d /lib/libzfs/os
parent657ce253575295ef680eb33cf4ef698548212a46 (diff)
Add FreeBSD jail support hooks
Add the 'zfs jail/unjail' subcommands along with the relevant documentation from FreeBSD. This feature is not supported on Linux and still requires the match kernel ioctls which will be included when the FreeBSD platform code is integrated. Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9686
Diffstat (limited to 'lib/libzfs/os')
-rw-r--r--lib/libzfs/os/linux/libzfs_mount_os.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/os/linux/libzfs_mount_os.c b/lib/libzfs/os/linux/libzfs_mount_os.c
index af1cafd28..c04eb2161 100644
--- a/lib/libzfs/os/linux/libzfs_mount_os.c
+++ b/lib/libzfs/os/linux/libzfs_mount_os.c
@@ -361,7 +361,7 @@ do_unmount(const char *mntpt, int flags)
}
int
-zfs_can_user_mount(void)
+zfs_mount_delegation_check(void)
{
- return (geteuid() == 0);
+ return ((geteuid() != 0) ? EACCES : 0);
}