Remove extra newlines from log/error messages
Signed-off-by: Pino Toscano <ptoscano@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
bc78383fac
Коммит
67ffe26dea
@ -151,7 +151,7 @@ int ssh_channel_request_pty_size1(ssh_channel channel, const char *terminal, int
|
|||||||
channel->request_state=SSH_CHANNEL_REQ_STATE_NONE;
|
channel->request_state=SSH_CHANNEL_REQ_STATE_NONE;
|
||||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||||
"Server denied PTY allocation");
|
"Server denied PTY allocation");
|
||||||
SSH_LOG(SSH_LOG_RARE, "PTY: denied\n");
|
SSH_LOG(SSH_LOG_RARE, "PTY: denied");
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
// Not reached
|
// Not reached
|
||||||
@ -270,7 +270,7 @@ SSH_PACKET_CALLBACK(ssh_packet_data1){
|
|||||||
|
|
||||||
str = ssh_buffer_get_ssh_string(packet);
|
str = ssh_buffer_get_ssh_string(packet);
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
SSH_LOG(SSH_LOG_FUNCTIONS, "Invalid data packet !\n");
|
SSH_LOG(SSH_LOG_FUNCTIONS, "Invalid data packet !");
|
||||||
return SSH_PACKET_USED;
|
return SSH_PACKET_USED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,11 +363,11 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SOC_UNSUPPORTED:
|
case SOC_UNSUPPORTED:
|
||||||
SSH_LOG(SSH_LOG_RARE, "Unsupported option: %s, line: %d\n",
|
SSH_LOG(SSH_LOG_RARE, "Unsupported option: %s, line: %d",
|
||||||
keyword, count);
|
keyword, count);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ssh_set_error(session, SSH_FATAL, "ERROR - unimplemented opcode: %d\n",
|
ssh_set_error(session, SSH_FATAL, "ERROR - unimplemented opcode: %d",
|
||||||
opcode);
|
opcode);
|
||||||
SAFE_FREE(x);
|
SAFE_FREE(x);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -203,7 +203,7 @@ static int ssh_connect_ai_timeout(ssh_session session, const char *host,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* s is connected ? */
|
/* s is connected ? */
|
||||||
SSH_LOG(SSH_LOG_PACKET, "Socket connected with timeout\n");
|
SSH_LOG(SSH_LOG_PACKET, "Socket connected with timeout");
|
||||||
ret = ssh_socket_set_blocking(s);
|
ret = ssh_socket_set_blocking(s);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ssh_set_error(session, SSH_FATAL,
|
ssh_set_error(session, SSH_FATAL,
|
||||||
@ -252,7 +252,7 @@ socket_t ssh_connect_host(ssh_session session, const char *host,
|
|||||||
struct addrinfo *bind_ai;
|
struct addrinfo *bind_ai;
|
||||||
struct addrinfo *bind_itr;
|
struct addrinfo *bind_itr;
|
||||||
|
|
||||||
SSH_LOG(SSH_LOG_PACKET, "Resolving %s\n", bind_addr);
|
SSH_LOG(SSH_LOG_PACKET, "Resolving %s", bind_addr);
|
||||||
|
|
||||||
rc = getai(bind_addr, 0, &bind_ai);
|
rc = getai(bind_addr, 0, &bind_ai);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
@ -346,7 +346,7 @@ socket_t ssh_connect_host_nonblocking(ssh_session session, const char *host,
|
|||||||
struct addrinfo *bind_ai;
|
struct addrinfo *bind_ai;
|
||||||
struct addrinfo *bind_itr;
|
struct addrinfo *bind_itr;
|
||||||
|
|
||||||
SSH_LOG(SSH_LOG_PACKET, "Resolving %s\n", bind_addr);
|
SSH_LOG(SSH_LOG_PACKET, "Resolving %s", bind_addr);
|
||||||
|
|
||||||
rc = getai(bind_addr, 0, &bind_ai);
|
rc = getai(bind_addr, 0, &bind_ai);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
|
@ -218,7 +218,7 @@ int ssh_gssapi_handle_userauth(ssh_session session, const char *user, uint32_t n
|
|||||||
maj_stat = gss_indicate_mechs(&min_stat, &supported);
|
maj_stat = gss_indicate_mechs(&min_stat, &supported);
|
||||||
for (i=0; i < supported->count; ++i){
|
for (i=0; i < supported->count; ++i){
|
||||||
ptr = ssh_get_hexa(supported->elements[i].elements, supported->elements[i].length);
|
ptr = ssh_get_hexa(supported->elements[i].elements, supported->elements[i].length);
|
||||||
SSH_LOG(SSH_LOG_DEBUG, "Supported mech %d: %s\n", i, ptr);
|
SSH_LOG(SSH_LOG_DEBUG, "Supported mech %d: %s", i, ptr);
|
||||||
free(ptr);
|
free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,7 +664,7 @@ static int ssh_gssapi_match(ssh_session session, gss_OID_set *valid_oids)
|
|||||||
if (maj_stat == GSS_S_COMPLETE && lifetime > 0) {
|
if (maj_stat == GSS_S_COMPLETE && lifetime > 0) {
|
||||||
gss_add_oid_set_member(&min_stat, oid, valid_oids);
|
gss_add_oid_set_member(&min_stat, oid, valid_oids);
|
||||||
ptr = ssh_get_hexa(oid->elements, oid->length);
|
ptr = ssh_get_hexa(oid->elements, oid->length);
|
||||||
SSH_LOG(SSH_LOG_DEBUG, "GSSAPI valid oid %d : %s\n", i, ptr);
|
SSH_LOG(SSH_LOG_DEBUG, "GSSAPI valid oid %d : %s", i, ptr);
|
||||||
SAFE_FREE(ptr);
|
SAFE_FREE(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,7 +491,7 @@ int ssh_get_kex1(ssh_session session) {
|
|||||||
if(session->session_state==SSH_SESSION_STATE_ERROR) {
|
if(session->session_state==SSH_SESSION_STATE_ERROR) {
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
SSH_LOG(SSH_LOG_PROTOCOL, "received SSH_SMSG_SUCCESS\n");
|
SSH_LOG(SSH_LOG_PROTOCOL, "received SSH_SMSG_SUCCESS");
|
||||||
|
|
||||||
return SSH_OK;
|
return SSH_OK;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ int ssh_options_set_algo(ssh_session session, int algo,
|
|||||||
const char *list) {
|
const char *list) {
|
||||||
if (!ssh_verify_existing_algo(algo, list)) {
|
if (!ssh_verify_existing_algo(algo, list)) {
|
||||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||||
"Setting method: no algorithm for method \"%s\" (%s)\n",
|
"Setting method: no algorithm for method \"%s\" (%s)",
|
||||||
ssh_kex_get_description(algo), list);
|
ssh_kex_get_description(algo), list);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ sftp_client_message sftp_get_client_message(sftp_session sftp) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ssh_set_error(sftp->session, SSH_FATAL,
|
ssh_set_error(sftp->session, SSH_FATAL,
|
||||||
"Received unhandled sftp message %d\n", msg->type);
|
"Received unhandled sftp message %d", msg->type);
|
||||||
sftp_client_message_free(msg);
|
sftp_client_message_free(msg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -451,11 +451,11 @@ int crypt_set_algorithms_server(ssh_session session){
|
|||||||
|
|
||||||
method = session->next_crypto->kex_methods[SSH_COMP_S_C];
|
method = session->next_crypto->kex_methods[SSH_COMP_S_C];
|
||||||
if(strcmp(method,"zlib") == 0){
|
if(strcmp(method,"zlib") == 0){
|
||||||
SSH_LOG(SSH_LOG_PACKET, "enabling S->C compression\n");
|
SSH_LOG(SSH_LOG_PACKET, "enabling S->C compression");
|
||||||
session->next_crypto->do_compress_out=1;
|
session->next_crypto->do_compress_out=1;
|
||||||
}
|
}
|
||||||
if(strcmp(method,"zlib@openssh.com") == 0){
|
if(strcmp(method,"zlib@openssh.com") == 0){
|
||||||
SSH_LOG(SSH_LOG_PACKET,"enabling S->C delayed compression\n");
|
SSH_LOG(SSH_LOG_PACKET,"enabling S->C delayed compression");
|
||||||
|
|
||||||
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
|
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
|
||||||
session->next_crypto->do_compress_out = 1;
|
session->next_crypto->do_compress_out = 1;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user