Sfoglia il codice sorgente

* Port [3006] to 1.2.11
* Disabled the process list checking.


svn: 3008

Bryan Drewery 20 anni fa
parent
commit
5629729a8c
7 ha cambiato i file con 19 aggiunte e 7 eliminazioni
  1. 1 0
      doc/UPDATES
  2. 0 3
      misc/help.txt
  3. 2 0
      src/main.c
  4. 7 1
      src/set.c
  5. 2 2
      src/set.h
  6. 4 0
      src/shell.c
  7. 3 1
      src/shell.h

+ 1 - 0
doc/UPDATES

@@ -26,6 +26,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_botset not making a bot grab a different capitalization of a nick. (fixes #283)
 * Hub nicks no longer show on leaf bots for partyline chat.
 * Hub bots can no longer being whois'd or match'd from leaf bots.
+* Disabled the process list checking.
 
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.

+ 0 - 3
misc/help.txt

@@ -1526,9 +1526,6 @@ See also: reload, backup
 [D]  $blogin$b           How to handle someone logging in to the shell.
 [D]  $btrace$b           How to handle someone tracing/debugging the bot.
 [D]  $bpromisc$b         How to handle when a interface is set to promiscuous mode.
-[D]  $bbad-process$b     How to handle when a running process not listed in process-list 
-                         is detected.
-[SL] $bprocess-list$b    Comma-separated list of "expected processes" running on the bots uid.
 [D]  $bhijack$b          How to handle when a commonly used hijack method attempt is detected. 
  
 [SL] $bservers$b         Comma-separated list of servers the bot will use.

+ 2 - 0
src/main.c

@@ -421,7 +421,9 @@ void core_10secondly()
     if (curcheck == 2)
       check_last();
     if (curcheck == 3) {
+#ifdef NOT_USED
       check_processes();
+#endif
       curcheck = 0;
     }
   }

+ 7 - 1
src/set.c

@@ -25,7 +25,10 @@ bool auth_chan = 1;
 char alias[1024] = "bc botcmd,bl botcmd ?,+list set +,-list set -,list set list";
 char auth_key[51] = "";
 char auth_prefix[2] = "";
+#ifdef NOT_USED
 int badprocess = DET_IGNORE;
+char process_list[1024] = "";
+#endif
 bool dccauth = 0;
 char *def_chanset = "+enforcebans +dynamicbans +userbans -bitch -protectops +cycle -inactive +userexempts -dynamicexempts +userinvites -dynamicinvites -nodesynch -closed -take -voice -private -fastop";
 int cloak_script = 0;
@@ -45,7 +48,6 @@ char msgop[21] = "";
 char msgpass[21] = "";
 int op_bots = 1;
 rate_t op_requests = { 2, 5 };
-char process_list[1024] = "";
 int promisc = DET_WARN;
 int trace = DET_DIE;
 bool offensive_bans = 1;
@@ -59,7 +61,9 @@ static variable_t vars[] = {
  VAR("auth-prefix",	auth_prefix,		sizeof(auth_prefix),		VAR_STRING|VAR_NOLHUB|VAR_PERM),
  VAR("auth-obscure",	&auth_obscure,		0,				VAR_INT|VAR_BOOL),
  VAR("dcc-autoaway",	&dcc_autoaway,		0,				VAR_INT|VAR_NOLOC),	
+#ifdef NOT_USED
  VAR("bad-process",	&badprocess,		0,				VAR_INT|VAR_DETECTED),
+#endif
  VAR("dccauth",		&dccauth,		0,				VAR_INT|VAR_BOOL),
  VAR("chanset",		glob_chanset,		sizeof(glob_chanset),		VAR_STRING|VAR_CHANSET|VAR_NOLHUB),
  VAR("cloak-script",	&cloak_script,		0,				VAR_INT|VAR_CLOAK|VAR_NOLHUB),
@@ -86,7 +90,9 @@ static variable_t vars[] = {
  VAR("nick",		origbotname,		sizeof(origbotname),		VAR_STRING|VAR_NOLHUB|VAR_NICK|VAR_NODEF|VAR_NOGHUB),
  VAR("op-bots",		&op_bots,		0,				VAR_INT|VAR_NOLOC),
  VAR("op-requests",	&op_requests,		0,				VAR_RATE|VAR_NOLOC),
+#ifdef NOT_USED
  VAR("process-list",	process_list,		sizeof(process_list),		VAR_STRING|VAR_LIST),
+#endif
  VAR("promisc",		&promisc,		0,				VAR_INT|VAR_DETECTED),
  VAR("realname",	botrealname,		sizeof(botrealname),		VAR_STRING|VAR_NOLHUB),
  VAR("server-port",	&default_port,		0,				VAR_INT|VAR_NOLHUB),

+ 2 - 2
src/set.h

@@ -56,11 +56,11 @@ typedef struct rate_b {
 } rate_t;
 
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
-			msgident[], msginvite[], msgop[], msgpass[], process_list[],
+			msgident[], msginvite[], msgop[], msgpass[],
                         homechan[];
 extern bool		dccauth, auth_obscure, offensive_bans, manop_warn, auth_chan;
 extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
-			kill_threshold, lag_threshold, op_bots, badprocess, hijack, login, promisc, trace,
+			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
                         ison_time;
 extern rate_t		op_requests, close_threshold;
 

+ 4 - 0
src/shell.c

@@ -207,6 +207,7 @@ void check_last() {
   }
 }
 
+#ifdef NOT_USED
 void check_processes()
 {
   if (badprocess == DET_IGNORE)
@@ -304,6 +305,7 @@ void check_processes()
   if (out)
     free(out);
 }
+#endif /* NOT_USED */
 
 void check_promisc()
 {
@@ -606,8 +608,10 @@ void detected(int code, char *msg)
     act = trace;
   if (code == DETECT_PROMISC)
     act = promisc;
+#ifdef NOT_USED
   if (code == DETECT_PROCESS)
     act = badprocess;
+#endif
   if (code == DETECT_SIGCONT)
     act = hijack;
 

+ 3 - 1
src/shell.h

@@ -29,7 +29,7 @@
 #define DETECT_LOGIN 	1
 #define DETECT_TRACE 	2
 #define DETECT_PROMISC 	3
-#define DETECT_PROCESS 	4
+#define DETECT_PROCESS 	4		/* NOT USED */
 #define DETECT_SIGCONT 	5
 
 #define DET_IGNORE 	0
@@ -57,7 +57,9 @@ int shell_exec(char *, char *, char **, char **);
 void check_last();
 void check_promisc();
 void check_trace(int);
+#ifdef NOT_USED
 void check_processes();
+#endif
 void check_crontab();
 void crontab_del();
 int crontab_exists();