From: reyk Date: Tue, 7 Aug 2018 14:49:05 +0000 (+0000) Subject: Post-g2k18 fix: unbreak the optional vmd-internal vmboot loader. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ea102623e0736a121a5c67ffe5715ffdd48267bd;p=openbsd 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@ --- 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 @@ -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",