diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2006-07-11 18:50:49 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2006-07-11 18:50:49 +0000 |
commit | 08c0648542c379047cf09b0eee2f33d4d17cf40f (patch) | |
tree | a34bcb2706ce1e4eb7436020dd75ccd693ac730c /usr.bin/ssh/session.c | |
parent | 449534206efec379c6c63b56bd7a56549ccf2ccd (diff) |
add ExitOnForwardFailure: terminate the connection if ssh(1)
cannot set up all requested dynamic, local, and remote port
forwardings. ok djm, dtucker, stevesk, jmc
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r-- | usr.bin/ssh/session.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index eb8e7735a6c..ca9412c9ccd 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.207 2006/07/08 21:48:53 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.208 2006/07/11 18:50:48 markus Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -330,7 +330,11 @@ do_authenticated1(Authctxt *authctxt) break; } debug("Received TCP/IP port forwarding request."); - channel_input_port_forward_request(s->pw->pw_uid == 0, options.gateway_ports); + if (channel_input_port_forward_request(s->pw->pw_uid == 0, + options.gateway_ports) < 0) { + debug("Port forwarding failed."); + break; + } success = 1; break; |