From 4bc721965ff272ad59c6e8a130a544e1e2c01b34 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Wed, 11 Dec 2019 11:58:37 -0800 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Signed-off-by: Ryan Moeller Closes #9686 --- lib/libzfs/os/linux/libzfs_mount_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libzfs/os') 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); } -- cgit v1.2.3