403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.103
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/comms/aprsd/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/comms/aprsd/files/patch-src_utils.cpp
--- src/utils.cpp.orig	2003-10-01 16:58:27 UTC
+++ src/utils.cpp
@@ -41,6 +41,7 @@ int CountDefault = 7;		   //Max of 7 instances of one 
 
 static RecursiveMutex pmtxLog;
 
+const string LOGPATH("/var/log/aprsd/");
 
 int WriteLog(const string& sp, const string& LogFile)
 {
@@ -50,11 +51,12 @@ int WriteLog(const string& sp, const string& LogFile)
     static Lock locker(pmtxLog, false);
 
     locker.get();
+    string pLogFile = LOGPATH + LogFile;
 
-    ofstream ofs(LogFile.c_str(), ios::out | ios::app);
+    ofstream ofs(pLogFile.c_str(), ios::out | ios::app);
 
     if (!ofs)
-        cerr << "File I/O Error: Unable to open/create file " << LogFile << endl;
+        cerr << "File I/O Error: Unable to open/create file " << pLogFile << endl;
 
     time(&ltime);                                       // Timestamp
     ctime_r(&ltime, szTime);                            // "threadsafe" ctime
@@ -91,8 +93,8 @@ int WriteLog(const char* pch, const char* LogFile)
 
     pthread_mutex_lock(pmtxLog);
 
-    char* pLogFile = new char[CONFPATH.length() + strlen(LogFile) +1];
-    strcpy(pLogFile,CONFPATH.c_str());
+    char* pLogFile = new char[LOGPATH.length() + strlen(LogFile) +1];
+    strcpy(pLogFile,LOGPATH.c_str());
     strcat(pLogFile, LogFile);
 
     f = fopen(pLogFile, "a");

Youez - 2016 - github.com/yon3zu
LinuXploit