Log remote-IP on login attempts
[citadel.git] / citadel / citserver.c
index 859c25fa9d3b46b22cf19212245b32f7470bf248..1df958512e88cdf024b5adf3391f77cf487f7b6d 100644 (file)
@@ -1032,10 +1032,10 @@ void do_command_loop(void) {
 
        /* Log the server command, but don't show passwords... */
        if ( (strncasecmp(cmdbuf, "PASS", 4)) && (strncasecmp(cmdbuf, "SETP", 4)) ) {
-               CtdlLogPrintf(CTDL_INFO, "%s\n", cmdbuf);
+               CtdlLogPrintf(CTDL_INFO, "CtdlCommand [%s] [%s] %s\n", CTDLUSERIP, CC->curr_user, cmdbuf);
        }
        else {
-               CtdlLogPrintf(CTDL_INFO, "<password command hidden from log>\n");
+               CtdlLogPrintf(CTDL_INFO, "CtdlCommand [%s] [%s] <password command hidden from log>\n", CTDLUSERIP, CC->curr_user);
        }
 
        buffer_output();