]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget
authoravg <avg@FreeBSD.org>
Mon, 11 May 2015 10:07:31 +0000 (10:07 +0000)
committeravg <avg@FreeBSD.org>
Mon, 11 May 2015 10:07:31 +0000 (10:07 +0000)
commit9f5ffddd44f79c4d1a2ef15601fbf3206884a7ff
treeb8a8a1be4325768477336a683b08cee6a3dddff6
parent4b7c07e495514c687abb5fe9c9708eb5a4f21545
zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget

This allows to ensure that we do not write to a file that was opened
for reading only or vice versa.

Also, use the correct capability in in zfs_ioc_send_new().

Differential Revision: https://reviews.freebsd.org/D2382
Reviewed by: delphij
MFC after: 17 days
Sponsored by: ClusterHQ
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c