From 595f17edfa10dcfa954a629265198ac7182819da Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Fri, 6 Dec 2024 11:44:57 -0500 Subject: [PATCH] [8001] Write client and proxy user info to ips data file in correct order. --- server/core/src/procLog.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/server/core/src/procLog.cpp b/server/core/src/procLog.cpp index 34e82e3af5..6217e9af26 100644 --- a/server/core/src/procLog.cpp +++ b/server/core/src/procLog.cpp @@ -9,6 +9,8 @@ #include +#include +#include #include #include @@ -89,10 +91,16 @@ logAgentProc( rsComm_t *rsComm ) { return UNIX_FILE_OPEN_ERR - errno; } - fprintf( fptr, "%s %s %s %s %s %s %u\n", - rsComm->proxyUser.userName, clientZone, - rsComm->clientUser.userName, proxyZone, - progName, remoteAddr, ( unsigned int ) time( 0 ) ); + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) + std::fprintf(fptr, + "%s %s %s %s %s %s %u\n", + rsComm->clientUser.userName, + clientZone, + rsComm->proxyUser.userName, + proxyZone, + progName, + remoteAddr, + static_cast(std::time(nullptr))); rsComm->procLogFlag = PROC_LOG_DONE; fclose( fptr );