فهرست منبع

* 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
 #undef volatile
 
 
 /* Defines for pack features */
 /* 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)
 * Removed many unnecesary compile defines: (.config controlling them makes more sense)
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
   RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS, UTCTIME, AUTOAWAY, AUTHHASH, SPLITHIJACK
   RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS, UTCTIME, AUTOAWAY, AUTHHASH, SPLITHIJACK
-  AUTOLOCK, NAZIPASS, GARBLESTRINGS, DCCAUTH
+  AUTOLOCK, NAZIPASS, GARBLESTRINGS, DCCAUTH, MESSUPTERM
   -Moved PSCLOAK entries to misc/responses.txt
   -Moved PSCLOAK entries to misc/responses.txt
   -Dccauth is now a .config option (1/0)
   -Dccauth is now a .config option (1/0)
+* Removed MESSUPTERM feature, no one used it anyway.
 * All dates are UTC (GMT) now.
 * All dates are UTC (GMT) now.
 * cmd_newleaf was sharing the new bot incorrectly.
 * cmd_newleaf was sharing the new bot incorrectly.
 * Fixed a cosmetic/memory bug in cmd_who.
 * 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
  * 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 */
 /* 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);
   signal(SIGTRAP, SIG_DFL);
   if (traced) {
   if (traced) {
     if (start) {
     if (start) {
-#ifdef S_MESSUPTERM
-      messup_term();
-#else
       kill(parent, SIGKILL);
       kill(parent, SIGKILL);
       exit(1);
       exit(1);
-#endif /* S_MESSUPTERM */
     } else
     } else
       detected(DETECT_TRACE, "I'm being traced!");
       detected(DETECT_TRACE, "I'm being traced!");
   } else {
   } else {
@@ -329,12 +325,8 @@ void check_trace(int start)
       i = ptrace(PTRACE_ATTACH, parent, 0, 0);
       i = ptrace(PTRACE_ATTACH, parent, 0, 0);
       if (i == (-1) && errno == EPERM) {
       if (i == (-1) && errno == EPERM) {
         if (start) {
         if (start) {
-#ifdef S_MESSUPTERM
-          messup_term();
-#else
           kill(parent, SIGKILL);
           kill(parent, SIGKILL);
           exit(1);
           exit(1);
-#endif /* S_MESSUPTERM */
         } else
         } else
           detected(DETECT_TRACE, "I'm being traced!");
           detected(DETECT_TRACE, "I'm being traced!");
       } else {
       } else {
@@ -356,12 +348,8 @@ void check_trace(int start)
     i = ptrace(PT_ATTACH, parent, 0, 0);
     i = ptrace(PT_ATTACH, parent, 0, 0);
     if (i == (-1) && errno == EBUSY) {
     if (i == (-1) && errno == EBUSY) {
         if (start) {
         if (start) {
-#ifdef S_MESSUPTERM
-          messup_term();
-#else
           kill(parent, SIGKILL);
           kill(parent, SIGKILL);
           exit(1);
           exit(1);
-#endif /* S_MESSUPTERM */
         } else
         } else
           detected(DETECT_TRACE, "I'm being traced");
           detected(DETECT_TRACE, "I'm being traced");
     } else {
     } else {
@@ -957,26 +945,6 @@ void crontab_create(int interval) {
   close(fd);
   close(fd);
   unlink(tmpFile);
   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 */
 #endif /* !CYGWIN_HACKS */
 
 
 #ifdef CRAZY_TRACE
 #ifdef CRAZY_TRACE