summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/parse.y
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-12-12 19:52:11 +0000
committerkn <kn@cvs.openbsd.org>2019-12-12 19:52:11 +0000
commit22831df2b48987cc1ba1b036d8e593b39c1d26cd (patch)
tree9d6796327074dfb636420d4ee0995eb3c1139856 /usr.sbin/vmd/parse.y
parentf0d9814cb53229366226b8f1162b14937258c74d (diff)
Make owner value mandatory
Omitting the owner value is not documented and ought to be rather invalid syntax, but it parses as "[socket] owner root:wheel" which is the same as simply omitting the owner line entirely. Require a value, that is treat "socket owner" and "owner" as invalid syntax and fail. OK denis
Diffstat (limited to 'usr.sbin/vmd/parse.y')
-rw-r--r--usr.sbin/vmd/parse.y8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y
index 8b323af25c4..be326146516 100644
--- a/usr.sbin/vmd/parse.y
+++ b/usr.sbin/vmd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.53 2019/12/12 03:53:38 pd Exp $ */
+/* $OpenBSD: parse.y,v 1.54 2019/12/12 19:52:10 kn Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -553,11 +553,7 @@ instance_flags : BOOT { vmc.vmc_insflags |= VMOP_CREATE_KERNEL; }
}
;
-owner_id : /* none */ {
- $$.uid = 0;
- $$.gid = -1;
- }
- | NUMBER {
+owner_id : NUMBER {
$$.uid = $1;
$$.gid = -1;
}