=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.277 retrieving revision 1.278 diff -u -r1.277 -r1.278 --- src/usr.bin/ssh/clientloop.c 2015/12/03 17:00:18 1.277 +++ src/usr.bin/ssh/clientloop.c 2015/12/26 07:46:03 1.278 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.277 2015/12/03 17:00:18 semarie Exp $ */ +/* $OpenBSD: clientloop.c,v 1.278 2015/12/26 07:46:03 semarie Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1473,7 +1473,14 @@ debug("Entering interactive session."); - if (options.forward_x11 || options.permit_local_command) { + if (options.control_master && + ! option_clear_or_none(options.control_path)) { + debug("pledge: id"); + if (pledge("stdio rpath wpath cpath unix inet dns proc exec id tty", + NULL) == -1) + fatal("%s pledge(): %s", __func__, strerror(errno)); + + } else if (options.forward_x11 || options.permit_local_command) { debug("pledge: exec"); if (pledge("stdio rpath wpath cpath unix inet dns proc exec tty", NULL) == -1) @@ -1488,13 +1495,6 @@ } else if (! option_clear_or_none(options.proxy_command)) { debug("pledge: proc"); if (pledge("stdio cpath unix inet dns proc tty", NULL) == -1) - fatal("%s pledge(): %s", __func__, strerror(errno)); - - } else if (options.control_master && - ! option_clear_or_none(options.control_path)) { - debug("pledge: filesystem create"); - if (pledge("stdio cpath unix inet dns tty", - NULL) == -1) fatal("%s pledge(): %s", __func__, strerror(errno)); } else {