OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf f74b821a66 Add `zfs allow` and `zfs unallow` support
ZFS allows for specific permissions to be delegated to normal users
with the `zfs allow` and `zfs unallow` commands.  In addition, non-
privileged users should be able to run all of the following commands:

  * zpool [list | iostat | status | get]
  * zfs [list | get]

Historically this functionality was not available on Linux.  In order
to add it the secpolicy_* functions needed to be implemented and mapped
to the equivalent Linux capability.  Only then could the permissions on
the `/dev/zfs` be relaxed and the internal ZFS permission checks used.

Even with this change some limitations remain.  Under Linux only the
root user is allowed to modify the namespace (unless it's a private
namespace).  This means the mount, mountpoint, canmount, unmount,
and remount delegations cannot be supported with the existing code.  It
may be possible to add this functionality in the future.

This functionality was validated with the cli_user and delegation test
cases from the ZFS Test Suite.  These tests exhaustively verify each
of the supported permissions which can be delegated and ensures only
an authorized user can perform it.

Two minor bug fixes were required for test-running.py.  First, the
Timer() object cannot be safely created in a `try:` block when there
is an unconditional `finally` block which references it.  Second,
when running as a normal user also check for scripts using the
both the .ksh and .sh suffixes.

Finally, existing users who are simulating delegations by setting
group permissions on the /dev/zfs device should revert that
customization when updating to a version with this change.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #362 
Closes #434 
Closes #4100
Closes #4394 
Closes #4410 
Closes #4487
2016-06-07 09:16:52 -07:00
cmd Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
config Linux 4.7 compat: handler->set() takes both dentry and inode 2016-06-01 18:10:06 -07:00
contrib Fix the test to use the variable 2016-05-13 20:44:03 -07:00
etc Systemd configuration fixes 2016-05-27 11:54:29 -07:00
include Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
lib Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
man Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
module Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
rpm Add missing RPM BuildRequires 2016-05-23 10:33:42 -07:00
scripts Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
tests Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
udev Add `zfs allow` and `zfs unallow` support 2016-06-07 09:16:52 -07:00
.gitignore Ignore *.{deb,rpm,tar.gz} files in the top directory. 2013-04-24 16:18:59 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
META Tag zfs-0.6.5 2015-09-11 11:16:38 -07:00
Makefile.am Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
TEST Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac OpenZFS 6736 - ZFS per-vdev ZAPs 2016-05-02 14:27:45 -07:00
copy-builtin Fix --enable-linux-builtin 2015-12-02 07:54:32 -08:00
zfs-script-config.sh.in Add zfs-helpers.sh script 2016-05-10 11:28:54 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

README.markdown

Native ZFS for Linux!

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers.

Full documentation for installing ZoL on your favorite Linux distribution can be found at: http://zfsonlinux.org