]> jfr.im git - irc/DALnet/bahamut.git/commitdiff
USE_SYSLOG: Include nick!user@host in SSL errors
authorKobi Shmueli <redacted>
Fri, 30 Nov 2018 20:56:54 +0000 (22:56 +0200)
committerKobi Shmueli <redacted>
Fri, 30 Nov 2018 20:56:54 +0000 (22:56 +0200)
src/ssl.c

index 1026bd73eef5b0483a8bc7b0541f6644471f995f..5b1e6405916beaf1e91ac40ec69b771f606c313b 100644 (file)
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -344,8 +344,11 @@ static int fatal_ssl_error(int ssl_error, int where, aClient *sptr)
                username : "<unregistered>", sptr->sockhost,
                (errno > 0) ? " " : " no ", errstr, ssl_errstr);
 #ifdef USE_SYSLOG
-    syslog(LOG_ERR, "SSL error in %s: %s [%s]", ssl_func, errstr,
-           ssl_errstr);
+    syslog(LOG_ERR, "SSL error in %s for %s!%s@%s: %s [%s]", ssl_func,
+            *sptr->name ? sptr->name : "<unknown>",
+            (sptr->user && sptr->user->username) ? sptr->user->
+            username : "<unregistered>", sptr->sockhost
+            errstr, ssl_errstr);
 #endif
 
     /* if we reply() something here, we might just trigger another