diff options
author | Aaron Bieber <abieber@cvs.openbsd.org> | 2017-12-06 13:29:03 +0000 |
---|---|---|
committer | Aaron Bieber <abieber@cvs.openbsd.org> | 2017-12-06 13:29:03 +0000 |
commit | 056b453c0466aaa8fd50e62c5969729c501d0c2e (patch) | |
tree | 4a6bb23d00ed720b82db36a7fe301d689f43f244 /usr.sbin | |
parent | 9e2458a0889041b8a41ad62a31900d2ce4c0673c (diff) |
Make vmd respect owner when starting non-disabled vms.
OK pd@, benno@
Diffstat (limited to 'usr.sbin')
-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\": " |