Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 8bf25ec7 authored by Rob Swindell's avatar Rob Swindell 💬

Lower the SSH-related log message severities to WARNING for SSH connections

parent 276a4a5b
......@@ -147,12 +147,12 @@ int thread_suid_broken=TRUE; /* NPTL is no longer broken */
} \
} while (0)
#define GCESSTR(status, str, sess, action) do { \
#define GCESSTR(status, str, log_level, sess, action) do { \
char *GCES_estr; \
int GCES_level; \
get_crypt_error_string(status, sess, &GCES_estr, action, &GCES_level);\
if (GCES_estr) { \
lprintf(GCES_level, "%s SSH %s from %s (session %d)", str, GCES_estr, __FUNCTION__, sess); \
lprintf(log_level, "%s SSH %s from %s (session %d)", str, GCES_estr, __FUNCTION__, sess); \
free_crypt_attrstr(GCES_estr); \
} \
} while (0)
......@@ -2424,7 +2424,7 @@ void output_thread(void* arg)
continue;
}
if (cryptStatusError((err=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->session_channel)))) {
GCESSTR(err, node, sbbs->ssh_session, "setting channel");
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting channel");
ssh_errors++;
sbbs->online=FALSE;
i=buftop-bufbot; // Pretend we sent it all
......@@ -2432,7 +2432,7 @@ void output_thread(void* arg)
else {
if(cryptStatusError((err=cryptPushData(sbbs->ssh_session, (char*)buf+bufbot, buftop-bufbot, &i)))) {
/* Handle the SSH error here... */
GCESSTR(err, node, sbbs->ssh_session, "pushing data");
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "pushing data");
ssh_errors++;
sbbs->online=FALSE;
i=buftop-bufbot; // Pretend we sent it all
......@@ -2440,9 +2440,9 @@ void output_thread(void* arg)
else {
// READ = WRITE TIMEOUT HACK... REMOVE WHEN FIXED
if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 5)))
GCESSTR(err, node, sbbs->ssh_session, "setting write timeout");
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting write timeout");
if(cryptStatusError((err=cryptFlushData(sbbs->ssh_session)))) {
GCESSTR(err, node, sbbs->ssh_session, "flushing data");
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "flushing data");
ssh_errors++;
if (err != CRYPT_ERROR_TIMEOUT) {
sbbs->online=FALSE;
......@@ -2451,7 +2451,7 @@ void output_thread(void* arg)
}
// READ = WRITE TIMEOUT HACK... REMOVE WHEN FIXED
if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 0)))
GCESSTR(err, node, sbbs->ssh_session, "setting write timeout");
GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting write timeout");
}
}
pthread_mutex_unlock(&sbbs->ssh_mutex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment