Fix a fatal error in client mode because of a missing pledge

Reported upstream

ok sthen@
This commit is contained in:
solene 2021-04-06 12:32:04 +00:00
parent 46ef9c62cf
commit 478cdcabea
2 changed files with 19 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.11 2021/02/01 19:54:19 sthen Exp $
# $OpenBSD: Makefile,v 1.12 2021/04/06 12:32:04 solene Exp $
COMMENT = link-aggregation VPN software
V = 2.3.5
DISTNAME = mlvpn-$V
REVISION = 0
REVISION = 1
CATEGORIES = net

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_privsep_c,v 1.1 2021/04/06 12:32:04 solene Exp $
wroute is required to avoid a crash at runtime as a client
Reported upstream https://github.com/zehome/MLVPN/issues/152
Index: src/privsep.c
--- src/privsep.c.orig
+++ src/privsep.c
@@ -190,7 +190,7 @@ priv_init(char *argv[], char *username)
close(socks[0]);
priv_fd = socks[1];
#ifdef HAVE_PLEDGE
- if (pledge("stdio inet unix recvfd", NULL) != 0) {
+ if (pledge("stdio inet unix recvfd wroute", NULL) != 0) {
err(1, "pledge");
}
#endif