summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/proc.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-07-15 14:36:55 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-07-15 14:36:55 +0000
commit8cdeb6e4ffa590d62cbbf399393a880b02aa1391 (patch)
tree6c9c3be26c2fd9724f333668c202b922a8f7036f /usr.sbin/vmd/proc.h
parent46a838c59155c1cb5be7092a1d73a53b3bb51c2d (diff)
Track resources and enforce cpu/memory/interface limits for non-root users.
The limits are currently hard-coded and undocumented (4 CPUs/VMs, 2G memory, 8 interfaces) but will be configurable in an upcoming diff. These limits are tracked in total usage; for example, a user will be able to run up to 4 VMs with 512M of memory or a single VM with 2G. OK ccardenas@ mlarkin@
Diffstat (limited to 'usr.sbin/vmd/proc.h')
-rw-r--r--usr.sbin/vmd/proc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/vmd/proc.h b/usr.sbin/vmd/proc.h
index 323b57acbc8..f0e4704aefb 100644
--- a/usr.sbin/vmd/proc.h
+++ b/usr.sbin/vmd/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.13 2018/06/26 10:00:08 reyk Exp $ */
+/* $OpenBSD: proc.h,v 1.14 2018/07/15 14:36:54 reyk Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
@@ -98,6 +98,7 @@ enum privsep_procid {
#define CONFIG_RELOAD 0x00
#define CONFIG_VMS 0x01
#define CONFIG_SWITCHES 0x02
+#define CONFIG_USERS 0x04
#define CONFIG_ALL 0xff
struct privsep_pipes {