freebsd-skq/usr.sbin
Bartek Rutkowski 569aaa3b97 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.

Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Reviewed by:	grehan, emaste
Sponsoied by:	Mysterious Code Ltd.
Differential Revision:	D12985
2017-11-11 22:50:14 +00:00
..
ac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
accton DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
acpi DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
adduser Remove 'adding_user.7' 2017-11-01 01:22:33 +00:00
amd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ancontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
apm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
apmd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
arp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
asf DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
audit DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
auditd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
auditdistd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
auditreduce DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
authpf DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
autofs DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bhyve bhyve: avoid applying capsicum capabilities to file that was not opened 2017-11-11 22:50:14 +00:00
bhyvectl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bhyveload DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
binmiscctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
blacklistctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
blacklistd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bluetooth DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
boot0cfg DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bootparamd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bsdconfig Update several more URLs 2017-10-29 08:17:03 +00:00
bsdinstall DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
bsnmpd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
btxld DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
camdd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
cdcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
chkgrp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
chown DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
chroot DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ckdist DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
clear_locks DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
config DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
cpucontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
crashinfo Allow matches of truncated version strings. 2017-07-19 18:41:16 +00:00
cron DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
crunch Remove badsect(8). 2017-11-05 22:00:54 +00:00
ctladm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ctld Use proper naming in a debug message. 2017-11-04 14:13:58 +00:00
ctm DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
cxgbetool DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
daemon DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
dconschat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
devctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
devinfo DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
digictl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
diskinfo DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
dumpcis DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
editmap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
edquota DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
eeprom DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
efidp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
efivar Simplify the efivar interface a little. 2017-11-10 23:30:23 +00:00
etcupdate Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
extattr DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
extattrctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fdcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fdformat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fdread DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fdwrite DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fifolog DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
flowctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fmtree DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
freebsd-update Fix freebsd-update(8) erroneous message and exit status when "fetch install" used. 2017-10-09 16:33:37 +00:00
fstyp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ftp-proxy DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
fwcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
getfmac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
getpmac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
gpioctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
gssd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
gstat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
hyperv DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
i2c DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ifmcstat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
inetd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
iostat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
iovctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ip6addrctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ipfwpcap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
iscsid DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
jail Strip EOL whitespace in usr.sbin/{jail,jexec} 2017-11-10 14:53:16 +00:00
jexec Strip EOL whitespace in usr.sbin/{jail,jexec} 2017-11-10 14:53:16 +00:00
jls DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
kbdcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
kbdmap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
keyserv DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
kgmon DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
kgzip DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
kldxref DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
lastlogin DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
lmcconfig DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
lpr DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
lptcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mailstats DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mailwrapper DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
makefs DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
makemap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
manctl The purge option hasn't been implemented since 1994 when we imported this 2017-09-09 03:09:02 +00:00
memcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mergemaster Update several more URLs 2017-10-29 08:17:03 +00:00
mfiutil DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mixer DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mld6query DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mlxcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mount_smbfs DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mountd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
moused DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mpsutil DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mptable DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mptutil DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mtest DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nandsim DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nandtool DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ndiscvt DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ndp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
newsyslog DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nfscbd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nfsd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nfsdumpstate DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nfsrevoke DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nfsuserd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ngctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nghook DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nmtree DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nologin DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nscd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ntp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nvram
ofwdump DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pc-sysinstall Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
pciconf DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
periodic periodic(8): delete trailing whitespace 2017-06-20 06:20:09 +00:00
pkg DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pmcannotate DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pmccontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pmcstat pmcstat(8): unbreak build with LDFLAGS+=-Wl,--as-needed 2017-11-03 00:12:32 +00:00
pmcstudy DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pnpinfo DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
portsnap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
powerd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ppp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pppctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
praliases DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
praudit DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
prometheus_sysctl_exporter DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pstat DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pw DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
pwd_mkdb DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
quot DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
quotaon DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rarpd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
repquota DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rip6query DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rmt DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
route6d DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.lockd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.statd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.umntall DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.yppasswdd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.ypupdated DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpc.ypxfrd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rpcbind DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rrenumd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rtadvctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rtadvd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rtprio DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rtsold DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
rwhod DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sa DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sendmail DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
service
services_mkdb DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
sesutil DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
setfib DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
setfmac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
setpmac DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
smbmsg DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
snapinfo DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
spkrtest
spray DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
syslogd When parsing UDP messages skip optional hostname as described by 2017-11-08 16:45:53 +00:00
sysrc Change my given name from "Garrett" to "Ngie" 2016-06-13 10:30:49 +00:00
tcpdchk DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tcpdmatch DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tcpdrop DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tcpdump DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
timed DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
traceroute DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
traceroute6 DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
trpt DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tzsetup DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
uathload DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
uefisign DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ugidfw DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
uhsoctl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
unbound DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
usbconfig DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
usbdump DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
utx DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
vidcontrol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
vigr META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
vipw DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
wake DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
watch DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
watchdogd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
wlandebug DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
wpa DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
yp_mkdb DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ypbind DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ypldap DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
yppoll DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
yppush DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ypserv DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ypset DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
zic DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
zonectl DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
zzz
Makefile Remove useless .if. The whole point of SUBDIR.yes was so that we 2017-11-09 14:31:25 +00:00
Makefile.amd64 Remove the si(4) driver and sicontrol(8) for Specialix serial cards. 2016-08-19 21:14:27 +00:00
Makefile.arm Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.arm64 arm64: build usr.sbin/acpi subdirectory 2015-11-08 20:56:04 +00:00
Makefile.i386 Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
Makefile.inc
Makefile.mips Document why we use -z nonexecstack in the Makefile since it 2015-11-21 16:37:11 +00:00
Makefile.powerpc Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
Makefile.sparc64 Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00