403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
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_aprsd.cpp
--- src/aprsd.cpp.orig	2003-05-29 03:09:39 UTC
+++ src/aprsd.cpp
@@ -98,7 +98,8 @@ string szAprsPath;
 int msgsn;
 
 const string HOMEDIR("/home/aprsd2");
-const string CONFPATH("");
+const string LOGPATH("/var/log/aprsd/");
+const string CONFPATH("/usr/local/etc/aprsd/");
 const string CONFFILE("aprsd.conf");
 const string MAINLOG("aprsd.log");
 const string STSMLOG("thirdparty.log");
@@ -126,7 +127,7 @@ void serverQuit(void)      /* Invoked by console 'q' q
     WriteLog(string("Server Shutdown"), MAINLOG);
     tcsetattr(fileno(stdin),TCSANOW,&initial_settings); //restore terminal mode
 
-    string outFile = CONFPATH;
+    string outFile = LOGPATH;
     outFile += SAVE_HISTORY;
     int n = SaveHistory(outFile);
 
@@ -872,8 +873,8 @@ int daemonInit(void)
     if (f.is_open()) {
         f.read(s, 10);
         xx = atoi(s);
-        kill(xx, SIGCHLD);      // Meaningless kill to determine if pid is used
-        if (errno != ESRCH) {
+        kill(xx, 0);      // Meaningless kill to determine if pid is used
+        if (errno == 0) {
             cout << "aprsd already running" << endl;
             cout << "PID: " << pid_file << endl;
             exit(1);
@@ -977,7 +978,7 @@ int main(int argc, char *argv[])
 
     //fdump = fopen("dump.txt","w+");  //debug
 
-        string histFile = CONFPATH;
+        string histFile = LOGPATH;
         histFile += SAVE_HISTORY;
         ReadHistory(histFile);
         

Youez - 2016 - github.com/yon3zu
LinuXploit