FreeBSD: Fix zfs jail and add a test

zfs_jail was not using zfs_ioctl so failed to map the IOC number
correctly.  Use zfs_ioctl to perform the jail ioctl and add a test 
case for FreeBSD.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10658
This commit is contained in:
Ryan Moeller
2020-08-01 11:44:54 -04:00
committed by GitHub
parent fe628bc21d
commit b6737193ee
10 changed files with 194 additions and 2 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ zfs_jail(zfs_handle_t *zhp, int jailid, int attach)
zc.zc_zoneid = jailid;
cmd = attach ? ZFS_IOC_JAIL : ZFS_IOC_UNJAIL;
if ((ret = ioctl(hdl->libzfs_fd, cmd, &zc)) != 0)
if ((ret = zfs_ioctl(hdl, cmd, &zc)) != 0)
zfs_standard_error(hdl, errno, errbuf);
return (ret);