Date: Sat, 18 Dec 2010 00:35:13 +0300 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/153258: [patch][zfs] creating ZVOLs requires `refreservation' ability Message-ID: <868vzo84mm.fsf@gmail.com> Resent-Message-ID: <201012172140.oBHLe8vS050656@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 153258 >Category: bin >Synopsis: [patch][zfs] creating ZVOLs requires `refreservation' ability >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-fs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 17 21:40:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: $ uname -vm FreeBSD 9.0-HEAD-20101216-JPSNAP #0: Thu Dec 16 07:13:24 UTC 2010 root@build-amd64-fbsd.allbsd.org:/usr/obj/usr/src/sys/GENERIC amd64 also affects v28 >Description: Creating zfs volumes for ordinary users requires ability to modify `refreservation' property. Is this reproducable on opensolaris? >How-To-Repeat: root# zpool create blah gptid/A-B-C-E root# zfs allow luser create,mount blah root# sysctl vfs.usermount=1 luser$ zfs create -V10m blah/test cannot create 'blah/test': permission denied luser$ truss zfs create -V10m blah/test 2>&1 | fgrep ioctl | tail -1 ioctl(3,0xcc285a18 { IORW 0x5a('Z'), 24, 3112 },0xffffd110) ERR#1 'Operation not permitted' luser$ grep "'Z'.*24" /usr/src/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h #define ZFS_IOC_CREATE _IOWR('Z', 24, struct zfs_cmd) root# zfs allow luser refreservation luser$ zfs create -V10m blah/test luser$ find /dev/zvol -ls 86 1 dr-xr-xr-x 3 root wheel 512 Dec 17 21:24 /dev/zvol 87 1 dr-xr-xr-x 2 root wheel 512 Dec 17 21:24 /dev/zvol/blah 85 0 crw-r----- 1 root operator 0, 85 Dec 17 21:23 /dev/zvol/blah/test >Fix: --- a.diff begins here --- Index: cddl/contrib/opensolaris/cmd/zfs/zfs.8 =================================================================== --- cddl/contrib/opensolaris/cmd/zfs/zfs.8 (revision 216504) +++ cddl/contrib/opensolaris/cmd/zfs/zfs.8 (working copy) @@ -2269,7 +2269,7 @@ clone subcommand Must also have the 'create' ability and the 'mount' ability in the origin file system. -create subcommand Must also have the 'mount' ability. +create subcommand Must also have the 'mount' and 'refreservation' ability. destroy subcommand Must also have the 'mount' ability. mount subcommand Allows mount, unmount, and create/remove zvol device links. Index: cddl/contrib/opensolaris/lib/pyzfs/common/allow.py =================================================================== --- cddl/contrib/opensolaris/lib/pyzfs/common/allow.py (revision 216504) +++ cddl/contrib/opensolaris/lib/pyzfs/common/allow.py (working copy) @@ -202,7 +202,7 @@ return d perms_subcmd = dict( - create=_("Must also have the 'mount' ability"), + create=_("Must also have the 'mount' and 'refreservation' ability"), destroy=_("Must also have the 'mount' ability"), snapshot=_("Must also have the 'mount' ability"), rollback=_("Must also have the 'mount' ability"), --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868vzo84mm.fsf>