bhyve/block_if: allow DIOCGMEDIASIZE ioctl

This is needed to get mediasize of the device after a resize event.

I missed this earlier as I was building WITH_BHYVE_SNAPSHOT, which
disables capsicum.

Reviewed by:	khng, markj
Fixes: ae9ea22e14 ("bhyve: get mediasize for character devices when ...")
Differential Revision:	https://reviews.freebsd.org/D34013
This commit is contained in:
Robert Wing 2022-01-25 07:44:13 -09:00
parent b7a74bbc41
commit 08cb63a12f

View file

@ -481,7 +481,7 @@ blockif_open(nvlist_t *nvl, const char *ident)
#ifndef WITHOUT_CAPSICUM
cap_rights_t rights;
cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE };
cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE, DIOCGMEDIASIZE };
#endif
pthread_once(&blockif_once, blockif_init);