summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-08-07 14:49:06 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-08-07 14:49:06 +0000
commit1ed28f9cea999b89eb40078d22ae1a87a4be3024 (patch)
tree9875c2f01b5a5b0b0bd4e7d9e328c9d36af32249
parent6c55e9abd74f8d11cdbd79200afc86db97e460ac (diff)
Post-g2k18 fix: unbreak the optional vmd-internal vmboot loader.
The new vm_checkaccess() call didn't account for the vmboot case. OK ccardenas@ mikeb@
-rw-r--r--usr.sbin/vmd/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c
index 95d959da307..550b73c1a39 100644
--- a/usr.sbin/vmd/config.c
+++ b/usr.sbin/vmd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.49 2018/08/07 11:28:29 reyk Exp $ */
+/* $OpenBSD: config.c,v 1.50 2018/08/07 14:49:05 reyk Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -256,7 +256,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid)
goto fail;
}
- if (vm_checkaccess(kernfd,
+ if (!vmboot && vm_checkaccess(kernfd,
vmc->vmc_checkaccess & VMOP_CREATE_KERNEL,
uid, R_OK) == -1) {
log_warnx("vm \"%s\" no read access to kernel %s",