summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authormestre@openbsd.org <mestre@openbsd.org>2017-06-23 07:24:48 +0000
committerDamien Miller <djm@mindrot.org>2017-06-24 16:48:39 +1000
commite238645d789cd7eb47541b66aea2a887ea122c9b (patch)
treef20abb2fe5bec4dafab98d0195cb8a0caf69cc99 /clientloop.c
parent5abbb31c4e7a6caa922cc1cbb14e87a77f9d19d3 (diff)
upstream commit
When using the escape sequence &~ the code path is client_loop() -> client_simple_escape_filter() -> process_escapes() -> fork() and the pledge for this path lacks the proc promise and therefore aborts the process. The solution is to just add proc the promise to this specific pledge. Reported by Gregoire Jadi gjadi ! omecha.info Insight with tb@, OK jca@ Upstream-ID: 63c05e30c28209519f476023b65b0b1b0387a05b
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c
index 612838376..b6443ced8 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.299 2017/05/31 09:15:42 deraadt Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.300 2017/06/23 07:24:48 mestre Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1255,7 +1255,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1255 1255
1256 } else { 1256 } else {
1257 debug("pledge: network"); 1257 debug("pledge: network");
1258 if (pledge("stdio unix inet dns tty", NULL) == -1) 1258 if (pledge("stdio unix inet dns proc tty", NULL) == -1)
1259 fatal("%s pledge(): %s", __func__, strerror(errno)); 1259 fatal("%s pledge(): %s", __func__, strerror(errno));
1260 } 1260 }
1261 1261