]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 325727:
authorjhb <jhb@FreeBSD.org>
Fri, 3 May 2019 00:20:02 +0000 (00:20 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 3 May 2019 00:20:02 +0000 (00:20 +0000)
commit85c75164f085c4d8c18f09d5f7c4496d3eb8b4ec
tree253c721d09d352ddb2cf9f35216024cf04b54070
parent37de53f6d0999f67a8934f0d0d7bed51e174d194
MFC 325727:
bhyve: avoid applying capsicum capabilities to file that was not opened

When using -l option targeting file that can't be opened (ie. nmdm module
is not loaded and /dev/nmdm* is specified) bhyve tries to apply capsicum
capabilities to a file that was not opened.

Enclose that code in an if statement and only run it on correctly opened
descriptor also providing meaningful message in case of an error.
usr.sbin/bhyve/uart_emul.c