-/* $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>
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;
}
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);
}
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\": "