[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Better error message in case of authentication failure



The following patch allows leafnode 2.0.0-alpha to better log
authentication failures.

--- orig/nntputil.c
+++ mod/nntputil.c
@@ -79,7 +79,9 @@
     if (reply == 281) {
 	return TRUE;
     } else if (reply != 381) {
-	ln_log(LNLOG_SINFO, LNLOG_CSERVER, "username rejected: %03d", reply);
+	ln_log(LNLOG_SINFO, LNLOG_CSERVER,
+               "authenticate: %s@%s: username rejected: %03d",
+               current_server->username, current_server->name, reply);
 	return FALSE;
     }
 
@@ -98,7 +100,8 @@
     reply = nntpreply(current_server);
     if (reply != 281) {
 	ln_log(LNLOG_SWARNING, LNLOG_CSERVER,
-	       "authenticate: password failed: %03d", reply);
+	       "authenticate: %s@%s: password failed: %03d",
+               current_server->username, current_server->name, reply);
 	return FALSE;
     }
     return TRUE;



  Sam
-- 
Samuel Tardieu -- sam@xxxxxxxxxxx -- http://www.rfc1149.net/sam
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/