summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-19 22:30:52 +0000
committerDamien Miller <djm@mindrot.org>2019-01-20 09:45:18 +1100
commit135e302cfdbe91817294317c337cc38c3ff01cba (patch)
tree7d573361ef182237059a260115e31b759fa90617 /serverloop.c
parent245c6a0b220b58686ee35bc5fc1c359e9be2faaa (diff)
upstream: fix error in refactor: use ssh_packet_disconnect() instead of
sshpkt_error(). The first one logs the error and exits (what we want) instead of just logging and blundering on. OpenBSD-Commit-ID: 39f51b43641dce9ce0f408ea6c0e6e077e2e91ae
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/serverloop.c b/serverloop.c
index afb32fd34..9602e050d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.212 2019/01/19 21:43:56 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.213 2019/01/19 22:30:52 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
@@ -642,7 +642,7 @@ server_request_session(struct ssh *ssh)
642 sshpkt_fatal(ssh, r, "%s: parse packet", __func__); 642 sshpkt_fatal(ssh, r, "%s: parse packet", __func__);
643 643
644 if (no_more_sessions) { 644 if (no_more_sessions) {
645 sshpkt_disconnect(ssh, "Possible attack: attempt to open a " 645 ssh_packet_disconnect(ssh, "Possible attack: attempt to open a "
646 "session after additional sessions disabled"); 646 "session after additional sessions disabled");
647 } 647 }
648 648
@@ -928,8 +928,10 @@ server_input_channel_req(int type, u_int32_t seq, struct ssh *ssh)
928 debug("server_input_channel_req: channel %u request %s reply %d", 928 debug("server_input_channel_req: channel %u request %s reply %d",
929 id, rtype, want_reply); 929 id, rtype, want_reply);
930 930
931 if (id >= INT_MAX || (c = channel_lookup(ssh, (int)id)) == NULL) 931 if (id >= INT_MAX || (c = channel_lookup(ssh, (int)id)) == NULL) {
932 sshpkt_disconnect(ssh, "%s: unknown channel %d", __func__, id); 932 ssh_packet_disconnect(ssh, "%s: unknown channel %d",
933 __func__, id);
934 }
933 if (!strcmp(rtype, "eow@openssh.com")) { 935 if (!strcmp(rtype, "eow@openssh.com")) {
934 if ((r = sshpkt_get_end(ssh)) != 0) 936 if ((r = sshpkt_get_end(ssh)) != 0)
935 sshpkt_fatal(ssh, r, "%s: parse packet", __func__); 937 sshpkt_fatal(ssh, r, "%s: parse packet", __func__);