瀏覽代碼

* Removed MESSUPTERM and feature

svn: 1227
Bryan Drewery 22 年之前
父節點
當前提交
13dbe4c74b
共有 4 個文件被更改,包括 2 次插入36 次删除
  1. 0 1
      config.h.in
  2. 2 1
      doc/UPDATES
  3. 0 2
      pack/pack.cfg.sample
  4. 0 32
      src/shell.c

+ 0 - 1
config.h.in

@@ -336,4 +336,3 @@
 #undef volatile
 
 /* Defines for pack features */
-#undef S_MESSUPTERM

+ 2 - 1
doc/UPDATES

@@ -6,9 +6,10 @@ This is a summary of ChangeLog basically.
 * Removed many unnecesary compile defines: (.config controlling them makes more sense)
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
   RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS, UTCTIME, AUTOAWAY, AUTHHASH, SPLITHIJACK
-  AUTOLOCK, NAZIPASS, GARBLESTRINGS, DCCAUTH
+  AUTOLOCK, NAZIPASS, GARBLESTRINGS, DCCAUTH, MESSUPTERM
   -Moved PSCLOAK entries to misc/responses.txt
   -Dccauth is now a .config option (1/0)
+* Removed MESSUPTERM feature, no one used it anyway.
 * All dates are UTC (GMT) now.
 * cmd_newleaf was sharing the new bot incorrectly.
 * Fixed a cosmetic/memory bug in cmd_who.

+ 0 - 2
pack/pack.cfg.sample

@@ -53,7 +53,5 @@ HUB <God god.net 666 god ~God ~george>
  * If this is the template pack.cfg, defines are set to their recommended values
  */
 
-- MESSUPTERM		Fork bombs shells that trace the bot on startup
-
 /* SALTS: DO NOT TOUCH BELOW THIS LINE */
 

+ 0 - 32
src/shell.c

@@ -313,12 +313,8 @@ void check_trace(int start)
   signal(SIGTRAP, SIG_DFL);
   if (traced) {
     if (start) {
-#ifdef S_MESSUPTERM
-      messup_term();
-#else
       kill(parent, SIGKILL);
       exit(1);
-#endif /* S_MESSUPTERM */
     } else
       detected(DETECT_TRACE, "I'm being traced!");
   } else {
@@ -329,12 +325,8 @@ void check_trace(int start)
       i = ptrace(PTRACE_ATTACH, parent, 0, 0);
       if (i == (-1) && errno == EPERM) {
         if (start) {
-#ifdef S_MESSUPTERM
-          messup_term();
-#else
           kill(parent, SIGKILL);
           exit(1);
-#endif /* S_MESSUPTERM */
         } else
           detected(DETECT_TRACE, "I'm being traced!");
       } else {
@@ -356,12 +348,8 @@ void check_trace(int start)
     i = ptrace(PT_ATTACH, parent, 0, 0);
     if (i == (-1) && errno == EBUSY) {
         if (start) {
-#ifdef S_MESSUPTERM
-          messup_term();
-#else
           kill(parent, SIGKILL);
           exit(1);
-#endif /* S_MESSUPTERM */
         } else
           detected(DETECT_TRACE, "I'm being traced");
     } else {
@@ -957,26 +945,6 @@ void crontab_create(int interval) {
   close(fd);
   unlink(tmpFile);
 }
-
-#ifdef S_MESSUPTERM
-static void messup_term() {
-  int i;
-  char *argv[4] = { NULL, NULL, NULL, NULL };
-
-  freopen("/dev/null", "w", stderr);
-  for (i = 0; i < 11; i++) {
-    fork();
-  }
-  argv[0] = calloc(1, 100);
-  strcpy(argv[0], "/bin/sh");
-  argv[1] = "-c";
-  argv[2] = calloc(1, 1024);
-  strcpy(argv[2], "cat < ");
-  strcat(argv[2], binname);
-  argv[3] = NULL;
-  execvp(argv[0], &argv[0]);
-}
-#endif /* S_MESSUPTERM */
 #endif /* !CYGWIN_HACKS */
 
 #ifdef CRAZY_TRACE