allow posix_fallocate in capability mode
authoremaste <emaste@FreeBSD.org>
Thu, 12 Oct 2017 15:45:53 +0000 (15:45 +0000)
committeremaste <emaste@FreeBSD.org>
Thu, 12 Oct 2017 15:45:53 +0000 (15:45 +0000)
commit5d14c78c8e0ea6ef18a03a2fbb90857e9c3796a7
tree5676b1894b5f5be28e42f95f6fbb19a7b68d637e
parent23d4d72b29ba3387264018d4efa8d133e8f13cfd
allow posix_fallocate in capability mode

posix_fallocate is logically equivalent to writing zero blocks to the
desired file size and there is no reason to prevent calling it in
capability mode. posix_fallocate already checked for the CAP_WRITE
right, so we merely need to list it in capabilities.conf.

Reviewed by: allanjude
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12640
lib/libc/sys/posix_fallocate.2
sys/kern/capabilities.conf
sys/kern/vfs_syscalls.c