From: ccardenas Date: Thu, 30 Nov 2017 01:28:27 +0000 (+0000) Subject: When performing vmctl reload and a previously configured vm is running, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0786ea8781effaa9e38ecfb1eacc0bb6348d09f2;p=openbsd When performing vmctl reload and a previously configured vm is running, exit with an EALREADY vs EPERM. ok mlarkin@ --- diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index c6438dcf091..894709cb407 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.74 2017/11/11 02:50:07 mlarkin Exp $ */ +/* $OpenBSD: vmd.c,v 1.75 2017/11/30 01:28:27 ccardenas Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -1101,7 +1101,7 @@ vm_register(struct privsep *ps, struct vmop_create_params *vmc, if ((vm = vm_getbyname(vcp->vcp_name)) != NULL || (vm = vm_getbyvmid(vcp->vcp_id)) != NULL) { - if (vm_checkperm(vm, uid) != 0 || vmc->vmc_flags != 0) { + if (vm_checkperm(vm, uid) != 0) { errno = EPERM; goto fail; }