home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / info-service / gopher / Unix / gopher2.0-patches / patch4 < prev    next >
Encoding:
Text File  |  1993-08-12  |  14.2 KB  |  518 lines

  1. diff -c gopher+/patchlevel.h:3.4 gopher+/patchlevel.h:3.5
  2. *** gopher+/patchlevel.h:3.4    Thu Aug 12 02:27:43 1993
  3. --- gopher+/patchlevel.h    Thu Aug 12 02:27:43 1993
  4. ***************
  5. *** 5,8 ****
  6.   #define GOPHER_MAJOR_VERSION "2"
  7.   #define GOPHER_MINOR_VERSION "0"
  8.   
  9. ! #define PATCHLEVEL 3
  10. --- 5,8 ----
  11.   #define GOPHER_MAJOR_VERSION "2"
  12.   #define GOPHER_MINOR_VERSION "0"
  13.   
  14. ! #define PATCHLEVEL 4
  15. diff -c gopher+/doc/client.changes:3.8 gopher+/doc/client.changes:3.9
  16. *** gopher+/doc/client.changes:3.8    Thu Aug 12 02:27:45 1993
  17. --- gopher+/doc/client.changes    Thu Aug 12 02:27:45 1993
  18. ***************
  19. *** 1,4 ****
  20. ! $Id: client.changes,v 3.8 1993/08/05 22:41:05 lindner Exp $
  21.   
  22.   Gopher+2.0 patchlevel 3
  23.   -----------------------
  24. --- 1,10 ----
  25. ! $Id: client.changes,v 3.9 1993/08/06 14:41:47 lindner Exp $
  26. ! Gopher+2.0 patchlevel 3
  27. ! -----------------------
  28. !  * Additional checking for mail address syntax from Wolfgang Ley.
  29.   
  30.   Gopher+2.0 patchlevel 3
  31.   -----------------------
  32. diff -c gopher+/doc/server.changes:3.8 gopher+/doc/server.changes:3.9
  33. *** gopher+/doc/server.changes:3.8    Thu Aug 12 02:27:46 1993
  34. --- gopher+/doc/server.changes    Thu Aug 12 02:27:46 1993
  35. ***************
  36. *** 1,4 ****
  37. ! $Id: server.changes,v 3.8 1993/08/05 22:41:06 lindner Exp $
  38.   
  39.   Gopher 2.0 patchlevel 3
  40.   -----------------------
  41. --- 1,15 ----
  42. ! $Id: server.changes,v 3.9 1993/08/06 14:41:51 lindner Exp $
  43. ! Gopher+2.0 patchlevel 4
  44. ! -----------------------
  45. !  * Enhanced Security logging from Wolfgang Ley
  46. !  * Fix for mindexd for Gopher+ clients.
  47. !  * dedot2 now skips over single quotes.
  48.   
  49.   Gopher 2.0 patchlevel 3
  50.   -----------------------
  51. diff -c gopher+/gopher/ourutils.c:3.20 gopher+/gopher/ourutils.c:3.21
  52. *** gopher+/gopher/ourutils.c:3.20    Thu Aug 12 02:27:49 1993
  53. --- gopher+/gopher/ourutils.c    Thu Aug 12 02:27:49 1993
  54. ***************
  55. *** 1,7 ****
  56.   /********************************************************************
  57.    * $Author: lindner $
  58. !  * $Revision: 3.20 $
  59. !  * $Date: 1993/08/05 20:40:43 $
  60.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  61.    * $State: Exp $
  62.    *
  63. --- 1,7 ----
  64.   /********************************************************************
  65.    * $Author: lindner $
  66. !  * $Revision: 3.21 $
  67. !  * $Date: 1993/08/06 14:39:57 $
  68.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  69.    * $State: Exp $
  70.    *
  71. ***************
  72. *** 15,20 ****
  73. --- 15,23 ----
  74.    *********************************************************************
  75.    * Revision History:
  76.    * $Log: ourutils.c,v $
  77. +  * Revision 3.21  1993/08/06  14:39:57  lindner
  78. +  * One more small security patch
  79. +  *
  80.    * Revision 3.20  1993/08/05  20:40:43  lindner
  81.    * Added warning message..
  82.    *
  83. ***************
  84. *** 197,203 ****
  85.   #define ACHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%.@!-_"
  86.               
  87.        if (SecureMode)
  88. !       if ( strspn(SaveName, ACHARS) != strlen(SaveName)) {
  89.              puts(CURgetBell(CursesScreen));
  90.              fflush(stdout);
  91.              Draw_Status("Address syntax rejected...");
  92. --- 200,207 ----
  93.   #define ACHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789%.@!-_"
  94.               
  95.        if (SecureMode)
  96. !       if ( strspn(SaveName, ACHARS) != strlen(SaveName)||
  97. !           *SaveName == '-') {
  98.              puts(CURgetBell(CursesScreen));
  99.              fflush(stdout);
  100.              Draw_Status("Address syntax rejected...");
  101. diff -c gopher+/gopherd/dedot.c:3.3 gopher+/gopherd/dedot.c:3.4
  102. *** gopher+/gopherd/dedot.c:3.3    Thu Aug 12 02:27:51 1993
  103. --- gopher+/gopherd/dedot.c    Thu Aug 12 02:27:52 1993
  104. ***************
  105. *** 1,7 ****
  106.   /********************************************************************
  107.    * $Author: lindner $
  108. !  * $Revision: 3.3 $
  109. !  * $Date: 1993/08/05 22:19:43 $
  110.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/dedot.c,v $
  111.    * $State: Exp $
  112.    *
  113. --- 1,7 ----
  114.   /********************************************************************
  115.    * $Author: lindner $
  116. !  * $Revision: 3.4 $
  117. !  * $Date: 1993/08/06 14:28:14 $
  118.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/dedot.c,v $
  119.    * $State: Exp $
  120.    *
  121. ***************
  122. *** 15,20 ****
  123. --- 15,23 ----
  124.    *********************************************************************
  125.    * Revision History:
  126.    * $Log: dedot.c,v $
  127. +  * Revision 3.4  1993/08/06  14:28:14  lindner
  128. +  * Further strip out single quotes
  129. +  *
  130.    * Revision 3.3  1993/08/05  22:19:43  lindner
  131.    * Fix for single quotes
  132.    *
  133. ***************
  134. *** 55,61 ****
  135.   ** John Sellens jmsellens@watdragon.waterloo.edu
  136.   */
  137.   
  138. ! void dequote();
  139.   void dedot1();
  140.   void dedot2();
  141.   
  142. --- 58,64 ----
  143.   ** John Sellens jmsellens@watdragon.waterloo.edu
  144.   */
  145.   
  146. ! void dequote1();
  147.   void dedot1();
  148.   void dedot2();
  149.   
  150. ***************
  151. *** 117,122 ****
  152. --- 120,126 ----
  153.        while ( *src ) {
  154.         switch ( *src ) {
  155.         case '"':
  156. +       case '\'':
  157.              /* Ignore it.. */
  158.              src++;
  159.              break;
  160. diff -c gopher+/gopherd/gopherd.c:3.28 gopher+/gopherd/gopherd.c:3.30
  161. *** gopher+/gopherd/gopherd.c:3.28    Thu Aug 12 02:27:52 1993
  162. --- gopher+/gopherd/gopherd.c    Thu Aug 12 02:27:53 1993
  163. ***************
  164. *** 1,7 ****
  165.   /********************************************************************
  166.    * $Author: lindner $
  167. !  * $Revision: 3.28 $
  168. !  * $Date: 1993/08/05 20:47:16 $
  169.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  170.    * $State: Exp $
  171.    *
  172. --- 1,7 ----
  173.   /********************************************************************
  174.    * $Author: lindner $
  175. !  * $Revision: 3.30 $
  176. !  * $Date: 1993/08/06 14:42:49 $
  177.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v $
  178.    * $State: Exp $
  179.    *
  180. ***************
  181. *** 15,20 ****
  182. --- 15,26 ----
  183.    *********************************************************************
  184.    * Revision History:
  185.    * $Log: gopherd.c,v $
  186. +  * Revision 3.30  1993/08/06  14:42:49  lindner
  187. +  * fix for mindex
  188. +  *
  189. +  * Revision 3.29  1993/08/06  14:30:40  lindner
  190. +  * Fixes for better security logging
  191. +  *
  192.    * Revision 3.28  1993/08/05  20:47:16  lindner
  193.    * Log execution of programs
  194.    *
  195. ***************
  196. *** 994,1000 ****
  197.               LOGGopher(sockfd, "Denied access for %s", Selstr+1);
  198.               break; 
  199.              }
  200. !            do_mindexd(sockfd, Selstr+7, CMDgetSearch(cmd));
  201.              break;
  202.         }
  203.   
  204. --- 1000,1007 ----
  205.               LOGGopher(sockfd, "Denied access for %s", Selstr+1);
  206.               break; 
  207.              }
  208. !            do_mindexd(sockfd, Selstr+7, CMDgetSearch(cmd), CMDisGplus(cmd),
  209. !               view);
  210.              break;
  211.         }
  212.   
  213. ***************
  214. *** 2055,2061 ****
  215.        if (startbyte != 0)
  216.         fseek(ZeFile, startbyte, 0);
  217.        
  218. !      if (pp = specialfile(ZeFile, pathname)) {
  219.         fclose(ZeFile);
  220.         ZeFile = pp;
  221.        }
  222. --- 2062,2068 ----
  223.        if (startbyte != 0)
  224.         fseek(ZeFile, startbyte, 0);
  225.        
  226. !      if (pp = specialfile(sockfd, ZeFile, pathname)) {
  227.         fclose(ZeFile);
  228.         ZeFile = pp;
  229.        }
  230. diff -c gopher+/gopherd/index.c:3.9 gopher+/gopherd/index.c:3.10
  231. *** gopher+/gopherd/index.c:3.9    Thu Aug 12 02:27:55 1993
  232. --- gopher+/gopherd/index.c    Thu Aug 12 02:27:55 1993
  233. ***************
  234. *** 1,7 ****
  235.   /********************************************************************
  236.    * $Author: lindner $
  237. !  * $Revision: 3.9 $
  238. !  * $Date: 1993/08/05 20:44:02 $
  239.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  240.    * $State: Exp $
  241.    *
  242. --- 1,7 ----
  243.   /********************************************************************
  244.    * $Author: lindner $
  245. !  * $Revision: 3.10 $
  246. !  * $Date: 1993/08/06 14:30:44 $
  247.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  248.    * $State: Exp $
  249.    *
  250. ***************
  251. *** 15,20 ****
  252. --- 15,23 ----
  253.    *********************************************************************
  254.    * Revision History:
  255.    * $Log: index.c,v $
  256. +  * Revision 3.10  1993/08/06  14:30:44  lindner
  257. +  * Fixes for better security logging
  258. +  *
  259.    * Revision 3.9  1993/08/05  20:44:02  lindner
  260.    * Use Gpopen instead of popen, remove extra filtering code
  261.    *
  262. ***************
  263. *** 315,321 ****
  264.        sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir);
  265.        Debug("Grep command is %s\n", command);
  266.   
  267. !      moocow = Gpopen(command, "r");
  268.        
  269.        if (moocow == NULL) {
  270.         writestring(sockfd, ".\r\n");
  271. --- 318,324 ----
  272.        sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir);
  273.        Debug("Grep command is %s\n", command);
  274.   
  275. !      moocow = Gpopen(sockfd, command, "r");
  276.        
  277.        if (moocow == NULL) {
  278.         writestring(sockfd, ".\r\n");
  279. ***************
  280. *** 372,378 ****
  281.   
  282.        sprintf(Command, "\"%s\" \"%s\"", Script, Searchstring);
  283.   
  284. !      Searchprocess = Gpopen(Command, "r");
  285.   
  286.        if (Searchprocess == NULL) {
  287.         writestring(sockfd, ".\r\n");
  288. --- 375,381 ----
  289.   
  290.        sprintf(Command, "\"%s\" \"%s\"", Script, Searchstring);
  291.   
  292. !      Searchprocess = Gpopen(sockfd, Command, "r");
  293.   
  294.        if (Searchprocess == NULL) {
  295.         writestring(sockfd, ".\r\n");
  296. diff -c gopher+/gopherd/mindexd.c:3.5 gopher+/gopherd/mindexd.c:3.6
  297. *** gopher+/gopherd/mindexd.c:3.5    Thu Aug 12 02:27:56 1993
  298. --- gopher+/gopherd/mindexd.c    Thu Aug 12 02:27:56 1993
  299. ***************
  300. *** 1,7 ****
  301.   /********************************************************************
  302.    * $Author: lindner $
  303. !  * $Revision: 3.5 $
  304. !  * $Date: 1993/07/29 21:21:27 $
  305.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/mindexd.c,v $
  306.    * $State: Exp $
  307.    *
  308. --- 1,7 ----
  309.   /********************************************************************
  310.    * $Author: lindner $
  311. !  * $Revision: 3.6 $
  312. !  * $Date: 1993/08/06 14:36:14 $
  313.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/mindexd.c,v $
  314.    * $State: Exp $
  315.    *
  316. ***************
  317. *** 15,20 ****
  318. --- 15,23 ----
  319.    *********************************************************************
  320.    * Revision History:
  321.    * $Log: mindexd.c,v $
  322. +  * Revision 3.6  1993/08/06  14:36:14  lindner
  323. +  * Fix for mindexd and gplus...
  324. +  *
  325.    * Revision 3.5  1993/07/29  21:21:27  lindner
  326.    * Removed excess variables
  327.    *
  328. ***************
  329. *** 189,199 ****
  330.   
  331.   
  332.   int
  333. ! do_mindexd(sockfd, config_filename, search)
  334.     int sockfd;
  335.     char *config_filename;
  336.     char *search;
  337.   {
  338.   
  339.        if ((LastSlave = getconfig(config_filename)) == -1) 
  340.            err_dump("can't read config file" );
  341. --- 192,207 ----
  342.   
  343.   
  344.   int
  345. ! do_mindexd(sockfd, config_filename, search, isgplus, view)
  346.     int sockfd;
  347.     char *config_filename;
  348.     char *search;
  349. +   int  isgplus;
  350. +   char *view;
  351.   {
  352. +      if (isgplus) 
  353. +       GSsendHeader(sockfd, -1);
  354.   
  355.        if ((LastSlave = getconfig(config_filename)) == -1) 
  356.            err_dump("can't read config file" );
  357. diff -c gopher+/gopherd/serverutil.c:3.11 gopher+/gopherd/serverutil.c:3.12
  358. *** gopher+/gopherd/serverutil.c:3.11    Thu Aug 12 02:27:57 1993
  359. --- gopher+/gopherd/serverutil.c    Thu Aug 12 02:27:57 1993
  360. ***************
  361. *** 1,7 ****
  362.   /********************************************************************
  363.    * $Author: lindner $
  364. !  * $Revision: 3.11 $
  365. !  * $Date: 1993/08/05 20:46:36 $
  366.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  367.    * $State: Exp $
  368.    *
  369. --- 1,7 ----
  370.   /********************************************************************
  371.    * $Author: lindner $
  372. !  * $Revision: 3.12 $
  373. !  * $Date: 1993/08/06 14:30:47 $
  374.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  375.    * $State: Exp $
  376.    *
  377. ***************
  378. *** 15,20 ****
  379. --- 15,23 ----
  380.    *********************************************************************
  381.    * Revision History:
  382.    * $Log: serverutil.c,v $
  383. +  * Revision 3.12  1993/08/06  14:30:47  lindner
  384. +  * Fixes for better security logging
  385. +  *
  386.    * Revision 3.11  1993/08/05  20:46:36  lindner
  387.    * Fix for Gpopen for single quotes and !
  388.    *
  389. ***************
  390. *** 481,487 ****
  391.   }
  392.   
  393.   FILE*
  394. ! Gpopen(cmd, rw)
  395.     char *cmd;
  396.     char *rw;
  397.   {
  398. --- 484,491 ----
  399.   }
  400.   
  401.   FILE*
  402. ! Gpopen(sockfd, cmd, rw)
  403. !   int  sockfd;
  404.     char *cmd;
  405.     char *rw;
  406.   {
  407. ***************
  408. *** 520,526 ****
  409.              /*** Stuff that's okay if quoted.. ***/
  410.   
  411.              if (!inquote && !insquote) {
  412. !             LOGGopher(0, "Possible Security Violation '%s'", cmd);
  413.               return(NULL);
  414.              }
  415.              
  416. --- 524,530 ----
  417.              /*** Stuff that's okay if quoted.. ***/
  418.   
  419.              if (!inquote && !insquote) {
  420. !             LOGGopher(sockfd, "Possible Security Violation '%s'", cmd);
  421.               return(NULL);
  422.              }
  423.              
  424. ***************
  425. *** 533,539 ****
  426.         case '$':
  427.              /*** Stuff that shouldn't be in there at all! **/
  428.   
  429. !            LOGGopher(0, "Possible Security Violation '%s'", cmd);
  430.              return(NULL);
  431.   
  432.              break;
  433. --- 537,543 ----
  434.         case '$':
  435.              /*** Stuff that shouldn't be in there at all! **/
  436.   
  437. !            LOGGopher(sockfd, "Possible Security Violation '%s'", cmd);
  438.              return(NULL);
  439.   
  440.              break;
  441. diff -c gopher+/gopherd/special.c:3.11 gopher+/gopherd/special.c:3.12
  442. *** gopher+/gopherd/special.c:3.11    Thu Aug 12 02:27:59 1993
  443. --- gopher+/gopherd/special.c    Thu Aug 12 02:28:00 1993
  444. ***************
  445. *** 1,7 ****
  446.   /********************************************************************
  447.    * $Author: lindner $
  448. !  * $Revision: 3.11 $
  449. !  * $Date: 1993/08/04 22:14:54 $
  450.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  451.    * $State: Exp $
  452.    *
  453. --- 1,7 ----
  454.   /********************************************************************
  455.    * $Author: lindner $
  456. !  * $Revision: 3.12 $
  457. !  * $Date: 1993/08/06 14:30:49 $
  458.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  459.    * $State: Exp $
  460.    *
  461. ***************
  462. *** 15,20 ****
  463. --- 15,23 ----
  464.    *********************************************************************
  465.    * Revision History:
  466.    * $Log: special.c,v $
  467. +  * Revision 3.12  1993/08/06  14:30:49  lindner
  468. +  * Fixes for better security logging
  469. +  *
  470.    * Revision 3.11  1993/08/04  22:14:54  lindner
  471.    * Mods to use Gpopen
  472.    *
  473. ***************
  474. *** 87,93 ****
  475.   static int ispipe;
  476.   
  477.   FILE *
  478. ! specialfile(fp, pathname)
  479.     FILE *fp;
  480.     char *pathname;
  481.   {
  482. --- 90,97 ----
  483.   static int ispipe;
  484.   
  485.   FILE *
  486. ! specialfile(sockfd, fp, pathname)
  487. !   int sockfd;
  488.     FILE *fp;
  489.     char *pathname;
  490.   {
  491. ***************
  492. *** 156,162 ****
  493.         
  494.         Debug("Executing %s\n", buf);
  495.   
  496. !       if (! (pp = Gpopen(buf, "r")))
  497.              return (FILE *)0;
  498.         ispipe = 1;
  499.         
  500. --- 160,166 ----
  501.         
  502.         Debug("Executing %s\n", buf);
  503.   
  504. !       if (! (pp = Gpopen(sockfd, buf, "r")))
  505.              return (FILE *)0;
  506.         ispipe = 1;
  507.         
  508.