diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.115 2001/12/27 20:39:58 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.116 2001/12/28 12:14:27 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -255,7 +255,7 @@ do_authenticated1(Authctxt *authctxt) | |||
255 | switch (type) { | 255 | switch (type) { |
256 | case SSH_CMSG_REQUEST_COMPRESSION: | 256 | case SSH_CMSG_REQUEST_COMPRESSION: |
257 | compression_level = packet_get_int(); | 257 | compression_level = packet_get_int(); |
258 | packet_done(); | 258 | packet_check_eom(); |
259 | if (compression_level < 1 || compression_level > 9) { | 259 | if (compression_level < 1 || compression_level > 9) { |
260 | packet_send_debug("Received illegal compression level %d.", | 260 | packet_send_debug("Received illegal compression level %d.", |
261 | compression_level); | 261 | compression_level); |
@@ -286,7 +286,7 @@ do_authenticated1(Authctxt *authctxt) | |||
286 | } else { | 286 | } else { |
287 | s->screen = 0; | 287 | s->screen = 0; |
288 | } | 288 | } |
289 | packet_done(); | 289 | packet_check_eom(); |
290 | success = session_setup_x11fwd(s); | 290 | success = session_setup_x11fwd(s); |
291 | if (!success) { | 291 | if (!success) { |
292 | xfree(s->auth_proto); | 292 | xfree(s->auth_proto); |
@@ -330,7 +330,7 @@ do_authenticated1(Authctxt *authctxt) | |||
330 | verbose("Kerberos TGT passing disabled."); | 330 | verbose("Kerberos TGT passing disabled."); |
331 | } else { | 331 | } else { |
332 | char *kdata = packet_get_string(&dlen); | 332 | char *kdata = packet_get_string(&dlen); |
333 | packet_done(); | 333 | packet_check_eom(); |
334 | 334 | ||
335 | /* XXX - 0x41, see creds_to_radix version */ | 335 | /* XXX - 0x41, see creds_to_radix version */ |
336 | if (kdata[0] != 0x41) { | 336 | if (kdata[0] != 0x41) { |
@@ -364,7 +364,7 @@ do_authenticated1(Authctxt *authctxt) | |||
364 | } else { | 364 | } else { |
365 | /* Accept AFS token. */ | 365 | /* Accept AFS token. */ |
366 | char *token = packet_get_string(&dlen); | 366 | char *token = packet_get_string(&dlen); |
367 | packet_done(); | 367 | packet_check_eom(); |
368 | 368 | ||
369 | if (auth_afs_token(s->authctxt, token)) | 369 | if (auth_afs_token(s->authctxt, token)) |
370 | success = 1; | 370 | success = 1; |
@@ -386,7 +386,7 @@ do_authenticated1(Authctxt *authctxt) | |||
386 | } else { | 386 | } else { |
387 | do_exec(s, NULL); | 387 | do_exec(s, NULL); |
388 | } | 388 | } |
389 | packet_done(); | 389 | packet_check_eom(); |
390 | session_close(s); | 390 | session_close(s); |
391 | return; | 391 | return; |
392 | 392 | ||
@@ -1575,7 +1575,7 @@ session_window_change_req(Session *s) | |||
1575 | s->row = packet_get_int(); | 1575 | s->row = packet_get_int(); |
1576 | s->xpixel = packet_get_int(); | 1576 | s->xpixel = packet_get_int(); |
1577 | s->ypixel = packet_get_int(); | 1577 | s->ypixel = packet_get_int(); |
1578 | packet_done(); | 1578 | packet_check_eom(); |
1579 | pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); | 1579 | pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); |
1580 | return 1; | 1580 | return 1; |
1581 | } | 1581 | } |
@@ -1640,7 +1640,7 @@ session_pty_req(Session *s) | |||
1640 | /* Set window size from the packet. */ | 1640 | /* Set window size from the packet. */ |
1641 | pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); | 1641 | pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); |
1642 | 1642 | ||
1643 | packet_done(); | 1643 | packet_check_eom(); |
1644 | session_proctitle(s); | 1644 | session_proctitle(s); |
1645 | return 1; | 1645 | return 1; |
1646 | } | 1646 | } |
@@ -1654,7 +1654,7 @@ session_subsystem_req(Session *s) | |||
1654 | char *cmd, *subsys = packet_get_string(&len); | 1654 | char *cmd, *subsys = packet_get_string(&len); |
1655 | int i; | 1655 | int i; |
1656 | 1656 | ||
1657 | packet_done(); | 1657 | packet_check_eom(); |
1658 | log("subsystem request for %s", subsys); | 1658 | log("subsystem request for %s", subsys); |
1659 | 1659 | ||
1660 | for (i = 0; i < options.num_subsystems; i++) { | 1660 | for (i = 0; i < options.num_subsystems; i++) { |
@@ -1689,7 +1689,7 @@ session_x11_req(Session *s) | |||
1689 | s->auth_proto = packet_get_string(NULL); | 1689 | s->auth_proto = packet_get_string(NULL); |
1690 | s->auth_data = packet_get_string(NULL); | 1690 | s->auth_data = packet_get_string(NULL); |
1691 | s->screen = packet_get_int(); | 1691 | s->screen = packet_get_int(); |
1692 | packet_done(); | 1692 | packet_check_eom(); |
1693 | 1693 | ||
1694 | success = session_setup_x11fwd(s); | 1694 | success = session_setup_x11fwd(s); |
1695 | if (!success) { | 1695 | if (!success) { |
@@ -1704,7 +1704,7 @@ session_x11_req(Session *s) | |||
1704 | static int | 1704 | static int |
1705 | session_shell_req(Session *s) | 1705 | session_shell_req(Session *s) |
1706 | { | 1706 | { |
1707 | packet_done(); | 1707 | packet_check_eom(); |
1708 | do_exec(s, NULL); | 1708 | do_exec(s, NULL); |
1709 | return 1; | 1709 | return 1; |
1710 | } | 1710 | } |
@@ -1714,7 +1714,7 @@ session_exec_req(Session *s) | |||
1714 | { | 1714 | { |
1715 | u_int len; | 1715 | u_int len; |
1716 | char *command = packet_get_string(&len); | 1716 | char *command = packet_get_string(&len); |
1717 | packet_done(); | 1717 | packet_check_eom(); |
1718 | do_exec(s, command); | 1718 | do_exec(s, command); |
1719 | xfree(command); | 1719 | xfree(command); |
1720 | return 1; | 1720 | return 1; |
@@ -1724,7 +1724,7 @@ static int | |||
1724 | session_auth_agent_req(Session *s) | 1724 | session_auth_agent_req(Session *s) |
1725 | { | 1725 | { |
1726 | static int called = 0; | 1726 | static int called = 0; |
1727 | packet_done(); | 1727 | packet_check_eom(); |
1728 | if (no_agent_forwarding_flag) { | 1728 | if (no_agent_forwarding_flag) { |
1729 | debug("session_auth_agent_req: no_agent_forwarding_flag"); | 1729 | debug("session_auth_agent_req: no_agent_forwarding_flag"); |
1730 | return 0; | 1730 | return 0; |