mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
server: use custom server banners
Value of session->serverbanner never gets used Signed-off-by: Audrius Butkevicius <audrius.butkevicius@gmail.com>
This commit is contained in:
committed by
Aris Adamantiadis
parent
4e04ec8bf5
commit
57418dd2cc
@@ -164,15 +164,15 @@ int ssh_send_banner(ssh_session session, int server) {
|
|||||||
if (session->serverbanner == NULL) {
|
if (session->serverbanner == NULL) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
snprintf(buffer, 128, "%s\n", session->serverbanner);
|
||||||
} else {
|
} else {
|
||||||
session->clientbanner = strdup(banner);
|
session->clientbanner = strdup(banner);
|
||||||
if (session->clientbanner == NULL) {
|
if (session->clientbanner == NULL) {
|
||||||
goto end;
|
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) {
|
if (ssh_socket_write(session->socket, buffer, strlen(buffer)) == SSH_ERROR) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user