[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] server: use custom server banners
[Thread Prev] | [Thread Next]
- Subject: [PATCH] server: use custom server banners
- From: Audrius Butkevicius <audrius.butkevicius@xxxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 04 Feb 2014 14:39:34 +0000
- To: libssh@xxxxxxxxxx
Hi, Patch attached, as per subject. Regards, Audrius.
From 281036388f4bbb62c0b2ed23ab648ee90c9fb126 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius <audrius.butkevicius@xxxxxxxxx> Date: Tue, 4 Feb 2014 14:34:33 +0000 Subject: [PATCH] server: use custom server banners Value of session->serverbanner never gets used Signed-off-by: Audrius Butkevicius <audrius.butkevicius@xxxxxxxxx> --- src/client.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index a095fec..50d6d68 100644 --- a/src/client.c +++ b/src/client.c @@ -164,15 +164,15 @@ int ssh_send_banner(ssh_session session, int server) { if (session->serverbanner == NULL) { goto end; } + snprintf(buffer, 128, "%s\n", session->serverbanner); } else { session->clientbanner = strdup(banner); if (session->clientbanner == NULL) { goto end; } + snprintf(buffer, 128, "%s\n", session->clientbanner); } - snprintf(buffer, 128, "%s\n", banner); - if (ssh_socket_write(session->socket, buffer, strlen(buffer)) == SSH_ERROR) { goto end; } -- 1.7.2.5
Archive administrator: postmaster@lists.cynapses.org