summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--monitor_wrap.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eda171ef..f54616ea6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,9 @@
19 - markus@cvs.openbsd.org 2003/10/11 08:26:43 19 - markus@cvs.openbsd.org 2003/10/11 08:26:43
20 [sshconnect2.c] 20 [sshconnect2.c]
21 search keys in reverse order; fixes #684 21 search keys in reverse order; fixes #684
22 - markus@cvs.openbsd.org 2003/10/11 11:36:23
23 [monitor_wrap.c]
24 return NULL for missing banner; ok djm@
22 25
2320031009 2620031009
24 - (dtucker) [sshd_config.5] UsePAM defaults to "no". ok djm@ 27 - (dtucker) [sshd_config.5] UsePAM defaults to "no". ok djm@
@@ -1336,4 +1339,4 @@
1336 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1339 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1337 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1340 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1338 1341
1339$Id: ChangeLog,v 1.3073 2003/10/15 05:55:59 dtucker Exp $ 1342$Id: ChangeLog,v 1.3074 2003/10/15 05:56:58 dtucker Exp $
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 99dfc8508..e19984ec0 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"
28RCSID("$OpenBSD: monitor_wrap.c,v 1.32 2003/09/23 20:17:11 markus Exp $"); 28RCSID("$OpenBSD: monitor_wrap.c,v 1.33 2003/10/11 11:36:23 markus Exp $");
29 29
30#include <openssl/bn.h> 30#include <openssl/bn.h>
31#include <openssl/dh.h> 31#include <openssl/dh.h>
@@ -224,7 +224,8 @@ mm_getpwnamallow(const char *login)
224 return (pw); 224 return (pw);
225} 225}
226 226
227char *mm_auth2_read_banner(void) 227char *
228mm_auth2_read_banner(void)
228{ 229{
229 Buffer m; 230 Buffer m;
230 char *banner; 231 char *banner;
@@ -235,10 +236,16 @@ char *mm_auth2_read_banner(void)
235 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTH2_READ_BANNER, &m); 236 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTH2_READ_BANNER, &m);
236 buffer_clear(&m); 237 buffer_clear(&m);
237 238
238 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTH2_READ_BANNER, &m); 239 mm_request_receive_expect(pmonitor->m_recvfd,
240 MONITOR_ANS_AUTH2_READ_BANNER, &m);
239 banner = buffer_get_string(&m, NULL); 241 banner = buffer_get_string(&m, NULL);
240 buffer_free(&m); 242 buffer_free(&m);
241 243
244 /* treat empty banner as missing banner */
245 if (strlen(banner) == 0) {
246 xfree(banner);
247 banner = NULL;
248 }
242 return (banner); 249 return (banner);
243} 250}
244 251