From 2d6502591bb2b20632e6f42c4ded569b7a5c911f Mon Sep 17 00:00:00 2001 From: benno Date: Thu, 1 Sep 2022 15:43:07 +0000 Subject: [PATCH] fix unveil(2) in vmctl(8), unix socket needs :w: ok mestre@ martijn@ --- usr.sbin/vmctl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index 1182e58e39a..01b0f417441 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.72 2022/07/30 14:17:42 kn Exp $ */ +/* $OpenBSD: main.c,v 1.73 2022/09/01 15:43:07 benno Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -196,7 +196,7 @@ vmmaction(struct parse_result *res) unsigned int flags; if (ctl_sock == -1) { - if (unveil(SOCKET_NAME, "r") == -1) + if (unveil(SOCKET_NAME, "w") == -1) err(1, "unveil %s", SOCKET_NAME); if ((ctl_sock = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0)) == -1) -- 2.20.1