From 3495a04b57a4c9e05453d4871380d8eebe69eacc Mon Sep 17 00:00:00 2001 From: reyk Date: Tue, 7 Aug 2018 11:28:29 +0000 Subject: [PATCH] Fix paste error in "no read access to" debug message, tweak messages. Found by mikeb@ --- usr.sbin/vmd/config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/vmd/config.c b/usr.sbin/vmd/config.c index ac5f1808a67..95d959da307 100644 --- a/usr.sbin/vmd/config.c +++ b/usr.sbin/vmd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.48 2018/07/15 14:36:54 reyk Exp $ */ +/* $OpenBSD: config.c,v 1.49 2018/08/07 11:28:29 reyk Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -259,7 +259,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid) if (vm_checkaccess(kernfd, vmc->vmc_checkaccess & VMOP_CREATE_KERNEL, uid, R_OK) == -1) { - log_warnx("vm \"%s\" no read access to %s", + log_warnx("vm \"%s\" no read access to kernel %s", vcp->vcp_name, vcp->vcp_kernel); errno = EPERM; goto fail; @@ -280,7 +280,7 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid) if (vm_checkaccess(cdromfd, vmc->vmc_checkaccess & VMOP_CREATE_CDROM, uid, R_OK) == -1) { - log_warnx("vm \"%s\" no read access to %s", + log_warnx("vm \"%s\" no read access to cdrom %s", vcp->vcp_name, vcp->vcp_cdrom); errno = EPERM; goto fail; @@ -301,8 +301,8 @@ config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid) if (vm_checkaccess(diskfds[i], vmc->vmc_checkaccess & VMOP_CREATE_DISK, uid, R_OK|W_OK) == -1) { - log_warnx("vm \"%s\" no read access to %s", - vcp->vcp_name, vcp->vcp_kernel); + log_warnx("vm \"%s\" no read/write access to disk %s", + vcp->vcp_name, vcp->vcp_disks[i]); errno = EPERM; goto fail; } -- 2.20.1