=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/mux.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- src/usr.bin/ssh/mux.c 2015/10/15 23:51:40 1.55 +++ src/usr.bin/ssh/mux.c 2015/12/03 17:00:18 1.56 @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.55 2015/10/15 23:51:40 djm Exp $ */ +/* $OpenBSD: mux.c,v 1.56 2015/12/03 17:00:18 semarie Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -1832,6 +1832,9 @@ mm_send_fd(fd, STDERR_FILENO) == -1) fatal("%s: send fds failed", __func__); + if (pledge("stdio proc tty", NULL) == -1) + fatal("%s pledge(): %s", __func__, strerror(errno)); + debug3("%s: session request sent", __func__); /* Read their reply */ @@ -1977,6 +1980,9 @@ mm_send_fd(fd, STDOUT_FILENO) == -1) fatal("%s: send fds failed", __func__); + if (pledge("stdio proc tty", NULL) == -1) + fatal("%s pledge(): %s", __func__, strerror(errno)); + debug3("%s: stdio forward request sent", __func__); /* Read their reply */ @@ -2138,6 +2144,9 @@ return; } set_nonblock(sock); + + if (pledge("stdio sendfd proc tty", NULL) == -1) + fatal("%s pledge(): %s", __func__, strerror(errno)); if (mux_client_hello_exchange(sock) != 0) { error("%s: master hello exchange failed", __func__);