summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-12-14 00:36:34 +0000
committerDamien Miller <djm@mindrot.org>2016-12-14 11:51:52 +1100
commitb737e4d7433577403a31cff6614f6a1b0b5e22f4 (patch)
tree29deb8610ba63b3cd6bead8161702a794eeeae1d
parent08a1e7014d65c5b59416a0e138c1f73f417496eb (diff)
upstream commit
disable Unix-domain socket forwarding when privsep is disabled Upstream-ID: ab61516ae0faadad407857808517efa900a0d6d0
-rw-r--r--serverloop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c
index 955f5cc91..c4e4699da 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.188 2016/11/30 03:00:05 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.189 2016/12/14 00:36:34 djm 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
@@ -479,7 +479,8 @@ server_request_direct_streamlocal(void)
479 479
480 /* XXX fine grained permissions */ 480 /* XXX fine grained permissions */
481 if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 && 481 if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 &&
482 !no_port_forwarding_flag && !options.disable_forwarding) { 482 !no_port_forwarding_flag && !options.disable_forwarding &&
483 use_privsep) {
483 c = channel_connect_to_path(target, 484 c = channel_connect_to_path(target,
484 "direct-streamlocal@openssh.com", "direct-streamlocal"); 485 "direct-streamlocal@openssh.com", "direct-streamlocal");
485 } else { 486 } else {
@@ -760,7 +761,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
760 761
761 /* check permissions */ 762 /* check permissions */
762 if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0 763 if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0
763 || no_port_forwarding_flag || options.disable_forwarding) { 764 || no_port_forwarding_flag || options.disable_forwarding ||
765 !use_privsep) {
764 success = 0; 766 success = 0;
765 packet_send_debug("Server has disabled port forwarding."); 767 packet_send_debug("Server has disabled port forwarding.");
766 } else { 768 } else {