We need CAP_MMAP_RW on memfd, since init_msix_table() may call mmap().
This commit is contained in:
parent
ad81354ceb
commit
007e172d64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317483
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user