diff options
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index f6bc34ec8..0d7a0e3bd 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.38 2004/07/03 11:02:25 dtucker Exp $"); | 28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.39 2004/07/17 05:31:41 dtucker Exp $"); |
29 | 29 | ||
30 | #include <openssl/bn.h> | 30 | #include <openssl/bn.h> |
31 | #include <openssl/dh.h> | 31 | #include <openssl/dh.h> |
@@ -70,6 +70,7 @@ extern z_stream incoming_stream; | |||
70 | extern z_stream outgoing_stream; | 70 | extern z_stream outgoing_stream; |
71 | extern struct monitor *pmonitor; | 71 | extern struct monitor *pmonitor; |
72 | extern Buffer input, output; | 72 | extern Buffer input, output; |
73 | extern Buffer loginmsg; | ||
73 | extern ServerOptions options; | 74 | extern ServerOptions options; |
74 | 75 | ||
75 | int | 76 | int |
@@ -642,7 +643,7 @@ int | |||
642 | mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | 643 | mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) |
643 | { | 644 | { |
644 | Buffer m; | 645 | Buffer m; |
645 | char *p; | 646 | char *p, *msg; |
646 | int success = 0; | 647 | int success = 0; |
647 | 648 | ||
648 | buffer_init(&m); | 649 | buffer_init(&m); |
@@ -658,11 +659,15 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
658 | return (0); | 659 | return (0); |
659 | } | 660 | } |
660 | p = buffer_get_string(&m, NULL); | 661 | p = buffer_get_string(&m, NULL); |
662 | msg = buffer_get_string(&m, NULL); | ||
661 | buffer_free(&m); | 663 | buffer_free(&m); |
662 | 664 | ||
663 | strlcpy(namebuf, p, namebuflen); /* Possible truncation */ | 665 | strlcpy(namebuf, p, namebuflen); /* Possible truncation */ |
664 | xfree(p); | 666 | xfree(p); |
665 | 667 | ||
668 | buffer_append(&loginmsg, msg, strlen(msg)); | ||
669 | xfree(msg); | ||
670 | |||
666 | *ptyfd = mm_receive_fd(pmonitor->m_recvfd); | 671 | *ptyfd = mm_receive_fd(pmonitor->m_recvfd); |
667 | *ttyfd = mm_receive_fd(pmonitor->m_recvfd); | 672 | *ttyfd = mm_receive_fd(pmonitor->m_recvfd); |
668 | 673 | ||