freebsd-dev/cmd/zfs
felixdoerre 501a1511ae
mount: use the mount syscall directly
Allow zfs datasets to be mounted on Linux without relying on the
invocation of an external processes.  This is the same behavior
which is implemented for FreeBSD.

Use of the libmount library was originally considered because it 
provides functionality to properly lock and update the /etc/mtab 
file.  However, these days /etc/mtab is typically a symlink to 
/proc/self/mounts so there's nothing to updated.  Therefore, we
call mount(2) directly and avoid any additional dependencies. 

If required the legacy behavior can be enabled by setting the 
ZFS_MOUNT_HELPER environment variable.  This may be needed in
environments where SELinux in enabled and the zfs binary does  
not have mount permission.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Felix Dörre <felix@dogcraft.de>
#10294
2020-05-20 18:02:41 -07:00
..
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs_iter.c Fix dataset name comparison in zfs_compare() 2019-05-08 16:42:39 -07:00
zfs_iter.h Illumos #2583 2013-11-21 11:13:53 -08:00
zfs_main.c mount: use the mount syscall directly 2020-05-20 18:02:41 -07:00
zfs_project.c Misc fixes and cleanup for project quota 2018-03-05 12:56:27 -08:00
zfs_projectutil.h Project Quota on ZFS 2018-02-13 14:54:54 -08:00
zfs_util.h Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00