diff options
author | 2017-12-06 13:29:02 +0000 | |
---|---|---|
committer | 2017-12-06 13:29:02 +0000 | |
commit | d557eb84f3ecba7789f85a77b6d6bbfe03009189 (patch) | |
tree | f4396cb9b745733e9186874d53e0dcfa18059e20 | |
parent | It's the imsg_compose(3) who accepts 'fd' argument, not imsg_create(3). (diff) | |
download | wireguard-openbsd-d557eb84f3ecba7789f85a77b6d6bbfe03009189.tar.xz wireguard-openbsd-d557eb84f3ecba7789f85a77b6d6bbfe03009189.zip |
Make vmd respect owner when starting non-disabled vms.
OK pd@, benno@
-rw-r--r-- | usr.sbin/vmd/vmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index 894709cb407..469a2856338 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.75 2017/11/30 01:28:27 ccardenas Exp $ */ +/* $OpenBSD: vmd.c,v 1.76 2017/12/06 13:29:02 abieber Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -102,7 +102,7 @@ vmd_dispatch_control(int fd, struct privsep_proc *p, struct imsg *imsg) cmd = IMSG_VMDOP_START_VM_RESPONSE; } if (res == 0 && - config_setvm(ps, vm, imsg->hdr.peerid, vmc.vmc_uid) == -1) { + config_setvm(ps, vm, imsg->hdr.peerid, vm->vm_params.vmc_uid) == -1) { res = errno; cmd = IMSG_VMDOP_START_VM_RESPONSE; } @@ -840,7 +840,7 @@ vmd_configure(void) vm->vm_params.vmc_params.vcp_name); continue; } - if (config_setvm(&env->vmd_ps, vm, -1, 0) == -1) + if (config_setvm(&env->vmd_ps, vm, -1, vm->vm_params.vmc_uid) == -1) return (-1); } @@ -918,7 +918,7 @@ vmd_reload(unsigned int reset, const char *filename) vm->vm_params.vmc_params.vcp_name); continue; } - if (config_setvm(&env->vmd_ps, vm, -1, 0) == -1) + if (config_setvm(&env->vmd_ps, vm, -1, vm->vm_params.vmc_uid) == -1) return (-1); } else { log_debug("%s: not creating vm \"%s\": " |