aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2017-04-27 05:48:52 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2017-04-27 05:48:52 +0000
commit007e172d64c834b458a33bbccd2a9a9cc0bf6ace (patch)
treeb492da660836224afdb792aec810b9da75398d61 /usr.sbin
parentad81354ceb3247a7508d60a99e03c8678da2b370 (diff)
downloadsrc-007e172d64c834b458a33bbccd2a9a9cc0bf6ace.tar.gz
src-007e172d64c834b458a33bbccd2a9a9cc0bf6ace.zip
We need CAP_MMAP_RW on memfd, since init_msix_table() may call mmap().
Notes
Notes: svn path=/head/; revision=317483
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/pci_passthru.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index 2c5366d51d6b..f314679d912b 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -703,6 +703,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
#ifndef WITHOUT_CAPSICUM
cap_rights_clear(&rights, CAP_IOCTL);
+ cap_rights_set(&rights, CAP_MMAP_RW);
if (cap_rights_limit(memfd, &rights) == -1 && errno != ENOSYS)
errx(EX_OSERR, "Unable to apply rights for sandbox");
#endif