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 / patch2 < prev    next >
Encoding:
Text File  |  1993-08-12  |  16.1 KB  |  594 lines

  1. diff -c gopher+/conf.h:3.5 gopher+/conf.h:3.6
  2. *** gopher+/conf.h:3.5    Thu Aug 12 02:24:43 1993
  3. --- gopher+/conf.h    Thu Aug 12 02:24:43 1993
  4. ***************
  5. *** 1,7 ****
  6.   /********************************************************************
  7.    * $Author: lindner $
  8. !  * $Revision: 3.5 $
  9. !  * $Date: 1993/07/27 05:35:30 $
  10.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $
  11.    * $State: Exp $
  12.    *
  13. --- 1,7 ----
  14.   /********************************************************************
  15.    * $Author: lindner $
  16. !  * $Revision: 3.6 $
  17. !  * $Date: 1993/08/04 22:07:42 $
  18.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $
  19.    * $State: Exp $
  20.    *
  21. ***************
  22. *** 15,20 ****
  23. --- 15,23 ----
  24.    *********************************************************************
  25.    * Revision History:
  26.    * $Log: conf.h,v $
  27. +  * Revision 3.6  1993/08/04  22:07:42  lindner
  28. +  * Use /bin/mail instead of ucbmail
  29. +  *
  30.    * Revision 3.5  1993/07/27  05:35:30  lindner
  31.    * reading material for VMS, dead code removal
  32.    *
  33. ***************
  34. *** 76,85 ****
  35.   #define PLAY_COMMAND "play -v 40 -"
  36.   #endif
  37.   
  38. - #if defined(hpux) || defined(_AUX_SOURCE) || defined(_SEQUENT_) || defined(USG)
  39. - #define MAIL_COMMAND "mailx"
  40. - #endif
  41.   #if defined(REMOTEUSER)
  42.   #define PAGER_COMMAND "Less -f -r"
  43.   #endif
  44. --- 79,84 ----
  45. ***************
  46. *** 131,137 ****
  47.   #endif
  48.   
  49.   #ifndef MAIL_COMMAND
  50. ! #define MAIL_COMMAND "mail"
  51.   #endif
  52.   
  53.   #ifndef TELNET_COMMAND
  54. --- 130,136 ----
  55.   #endif
  56.   
  57.   #ifndef MAIL_COMMAND
  58. ! #define MAIL_COMMAND "/bin/mail"
  59.   #endif
  60.   
  61.   #ifndef TELNET_COMMAND
  62. diff -c gopher+/doc/client.changes:3.6 gopher+/doc/client.changes:3.7
  63. *** gopher+/doc/client.changes:3.6    Thu Aug 12 02:24:46 1993
  64. --- gopher+/doc/client.changes    Thu Aug 12 02:24:46 1993
  65. ***************
  66. *** 1,4 ****
  67. ! $Id: client.changes,v 3.6 1993/08/03 21:02:03 lindner Exp $
  68.   
  69.   Gopher+2.0 patchlevel 1
  70.   -----------------------
  71. --- 1,14 ----
  72. ! $Id: client.changes,v 3.7 1993/08/04 22:23:41 lindner Exp $
  73. ! Gopher+2.0 patchlevel 2
  74. ! -----------------------
  75. !  * Use /bin/mail instead of ucbmail
  76. !  * Rebuild client if patchlevel.h changes
  77. !  * Fix for problems with '=' and '?' and /bin/mail Gripe mods
  78.   
  79.   Gopher+2.0 patchlevel 1
  80.   -----------------------
  81. diff -c gopher+/doc/server.changes:3.6 gopher+/doc/server.changes:3.7
  82. *** gopher+/doc/server.changes:3.6    Thu Aug 12 02:24:47 1993
  83. --- gopher+/doc/server.changes    Thu Aug 12 02:24:48 1993
  84. ***************
  85. *** 1,4 ****
  86. ! $Id: server.changes,v 3.6 1993/08/03 21:03:45 lindner Exp $
  87.   
  88.   
  89.   Gopher 2.0 patchlevel 1
  90. --- 1,11 ----
  91. ! $Id: server.changes,v 3.7 1993/08/04 22:23:45 lindner Exp $
  92. ! Gopher 2.0 patchlevel 2
  93. ! -----------------------
  94. !  * Rebuild server if patchlevel.h changes
  95. !  * Mods to use secure popen
  96.   
  97.   
  98.   Gopher 2.0 patchlevel 1
  99. diff -c gopher+/gopher/Makefile:3.4 gopher+/gopher/Makefile:3.5
  100. *** gopher+/gopher/Makefile:3.4    Thu Aug 12 02:24:51 1993
  101. --- gopher+/gopher/Makefile    Thu Aug 12 02:24:51 1993
  102. ***************
  103. *** 1,7 ****
  104.   #********************************************************************
  105.   # $Author: lindner $
  106. ! # $Revision: 3.4 $
  107. ! # $Date: 1993/07/27 05:28:45 $
  108.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/Makefile,v $
  109.   # $State: Exp $
  110.   #
  111. --- 1,7 ----
  112.   #********************************************************************
  113.   # $Author: lindner $
  114. ! # $Revision: 3.5 $
  115. ! # $Date: 1993/08/04 22:06:35 $
  116.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/Makefile,v $
  117.   # $State: Exp $
  118.   #
  119. ***************
  120. *** 15,20 ****
  121. --- 15,23 ----
  122.   #*********************************************************************
  123.   # Revision History:
  124.   # $Log: Makefile,v $
  125. + # Revision 3.5  1993/08/04  22:06:35  lindner
  126. + # Rebuild client if patchlevel.h changes
  127. + #
  128.   # Revision 3.4  1993/07/27  05:28:45  lindner
  129.   # Mondo Debug overhaul from Mitra
  130.   #
  131. ***************
  132. *** 76,78 ****
  133. --- 79,83 ----
  134.   
  135.   $(OBJS): gopher.h ../conf.h
  136.   globals.o: globals.h
  137. + gopherrc.o: ../patchlevel.h
  138. + manager.o: ../patchlevel.h
  139. diff -c gopher+/gopher/gopher.c:3.25 gopher+/gopher/gopher.c:3.26
  140. *** gopher+/gopher/gopher.c:3.25    Thu Aug 12 02:24:52 1993
  141. --- gopher+/gopher/gopher.c    Thu Aug 12 02:24:52 1993
  142. ***************
  143. *** 1,7 ****
  144.   /********************************************************************
  145.    * $Author: lindner $
  146. !  * $Revision: 3.25 $
  147. !  * $Date: 1993/08/03 20:48:27 $
  148.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  149.    * $State: Exp $
  150.    *
  151. --- 1,7 ----
  152.   /********************************************************************
  153.    * $Author: lindner $
  154. !  * $Revision: 3.26 $
  155. !  * $Date: 1993/08/04 22:08:47 $
  156.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $
  157.    * $State: Exp $
  158.    *
  159. ***************
  160. *** 15,20 ****
  161. --- 15,23 ----
  162.    *********************************************************************
  163.    * Revision History:
  164.    * $Log: gopher.c,v $
  165. +  * Revision 3.26  1993/08/04  22:08:47  lindner
  166. +  * Fix for problems with '=' and '?' and /bin/mail Gripe mods
  167. +  *
  168.    * Revision 3.25  1993/08/03  20:48:27  lindner
  169.    * Audio file fix from jqj
  170.    *
  171. ***************
  172. *** 273,281 ****
  173.         return;
  174.        }
  175.   
  176. !      sprintf(mailcmd, "%s -s \"%s\" %s", MAIL_COMMAND, gripemess[0], email);
  177.        
  178.        f = popen(mailcmd, "w");
  179.        for (i=1; i< 10; i++) {
  180.         fprintf(f, "%s\n", gripemess[i]);
  181.         free(gripemess[i]);
  182. --- 276,290 ----
  183.         return;
  184.        }
  185.   
  186. !      sprintf(mailcmd, "%s %s", MAIL_COMMAND, email);
  187.        
  188.        f = popen(mailcmd, "w");
  189. +      if (f == NULL) {
  190. +       CursesErrorMsg("Cannot send mail...");
  191. +       return;
  192. +      }
  193. +      fprintf(f, "Subject: %s\n\n", gripemess[0]);
  194.        for (i=1; i< 10; i++) {
  195.         fprintf(f, "%s\n", gripemess[i]);
  196.         free(gripemess[i]);
  197. ***************
  198. *** 519,525 ****
  199.        char    *view = NULL;
  200.        boolean WritePipe = FALSE,
  201.                ForkOff   = FALSE;
  202. !      boolean GS2FileSucceeded;
  203.        int     Child;
  204.   
  205.        DebugGSplusPrint(ZeGopher, "showfile:start");
  206. --- 528,534 ----
  207.        char    *view = NULL;
  208.        boolean WritePipe = FALSE,
  209.                ForkOff   = FALSE;
  210. !      boolean GS2FileSucceeded = TRUE;
  211.        int     Child;
  212.   
  213.        DebugGSplusPrint(ZeGopher, "showfile:start");
  214. diff -c gopher+/gopher/ourutils.c:3.18 gopher+/gopher/ourutils.c:3.19
  215. *** gopher+/gopher/ourutils.c:3.18    Thu Aug 12 02:24:53 1993
  216. --- gopher+/gopher/ourutils.c    Thu Aug 12 02:24:54 1993
  217. ***************
  218. *** 1,7 ****
  219.   /********************************************************************
  220.    * $Author: lindner $
  221. !  * $Revision: 3.18 $
  222. !  * $Date: 1993/08/03 04:43:59 $
  223.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  224.    * $State: Exp $
  225.    *
  226. --- 1,7 ----
  227.   /********************************************************************
  228.    * $Author: lindner $
  229. !  * $Revision: 3.19 $
  230. !  * $Date: 1993/08/04 22:07:23 $
  231.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $
  232.    * $State: Exp $
  233.    *
  234. ***************
  235. *** 15,20 ****
  236. --- 15,23 ----
  237.    *********************************************************************
  238.    * Revision History:
  239.    * $Log: ourutils.c,v $
  240. +  * Revision 3.19  1993/08/04  22:07:23  lindner
  241. +  * Use /bin/mail instead of ucbmail
  242. +  *
  243.    * Revision 3.18  1993/08/03  04:43:59  lindner
  244.    * Fix for VMS unresolved variables
  245.    *
  246. ***************
  247. *** 167,172 ****
  248. --- 170,177 ----
  249.   {
  250.        static char *SaveName = NULL;
  251.        char command[512];
  252. +      FILE *infile, *mailit;
  253. +      char buf[512];
  254.        
  255.        if (SaveName==NULL) {
  256.         if ((SaveName = (char *) malloc(sizeof(char)*256)) == NULL)
  257. ***************
  258. *** 200,210 ****
  259.   #ifdef VMS
  260.        sprintf(command, "%s/subject=\"%s\" %s %s", 
  261.              MAIL_COMMAND, Realname, Filename, SaveName);
  262.   #else
  263. !      sprintf(command, "%s -s \"%s\" %s < %s", 
  264. !          MAIL_COMMAND, Realname, SaveName, Filename);
  265.   #endif
  266. -      system(command);
  267.   
  268.   }
  269.   
  270. --- 205,229 ----
  271.   #ifdef VMS
  272.        sprintf(command, "%s/subject=\"%s\" %s %s", 
  273.              MAIL_COMMAND, Realname, Filename, SaveName);
  274. +      system(command);
  275.   #else
  276. !      sprintf(command, "%s %s", 
  277. !          MAIL_COMMAND, SaveName);
  278. !      
  279. !      infile = fopen(Filename, "r");
  280. !      mailit = popen(command, "w");
  281. !      
  282. !      fprintf(mailit, "Subject: %s\n\n", Realname);
  283. !      while (readline(fileno(infile), buf, sizeof(buf))) {
  284. !       twirl();
  285. !       fprintf(mailit, "%s", buf);
  286. !      }
  287. !      pclose(mailit);
  288. !      fclose(infile);
  289.   #endif
  290.   
  291.   }
  292.   
  293. diff -c gopher+/gopherd/Makefile:3.5 gopher+/gopherd/Makefile:3.6
  294. *** gopher+/gopherd/Makefile:3.5    Thu Aug 12 02:24:57 1993
  295. --- gopher+/gopherd/Makefile    Thu Aug 12 02:24:57 1993
  296. ***************
  297. *** 1,7 ****
  298.   #********************************************************************
  299.   # $Author: lindner $
  300. ! # $Revision: 3.5 $
  301. ! # $Date: 1993/07/27 05:27:34 $
  302.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  303.   # $State: Exp $
  304.   #
  305. --- 1,7 ----
  306.   #********************************************************************
  307.   # $Author: lindner $
  308. ! # $Revision: 3.6 $
  309. ! # $Date: 1993/08/04 22:12:01 $
  310.   # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $
  311.   # $State: Exp $
  312.   #
  313. ***************
  314. *** 15,20 ****
  315. --- 15,23 ----
  316.   #*********************************************************************
  317.   # Revision History:
  318.   # $Log: Makefile,v $
  319. + # Revision 3.6  1993/08/04  22:12:01  lindner
  320. + # Rebuild server if patchlevel.h changes
  321. + #
  322.   # Revision 3.5  1993/07/27  05:27:34  lindner
  323.   # Mondo Debug overhaul from Mitra
  324.   #
  325. ***************
  326. *** 101,107 ****
  327.   waisgopher.o: waisgopher.c
  328.       $(CC) $(CCFLAGS) -c waisgopher.c
  329.   
  330. ! gopherd.o: gopherd.c
  331.       $(CC) $(CCFLAGS) -DCONF_FILE=\"$(SERVERDIR)/gopherd.conf\" -c gopherd.c
  332.   
  333.   
  334. --- 104,110 ----
  335.   waisgopher.o: waisgopher.c
  336.       $(CC) $(CCFLAGS) -c waisgopher.c
  337.   
  338. ! gopherd.o: gopherd.c ../patchlevel.h
  339.       $(CC) $(CCFLAGS) -DCONF_FILE=\"$(SERVERDIR)/gopherd.conf\" -c gopherd.c
  340.   
  341.   
  342. diff -c gopher+/gopherd/globals.h:3.5 gopher+/gopherd/globals.h:3.6
  343. *** gopher+/gopherd/globals.h:3.5    Thu Aug 12 02:24:57 1993
  344. --- gopher+/gopherd/globals.h    Thu Aug 12 02:24:58 1993
  345. ***************
  346. *** 1,7 ****
  347.   /********************************************************************
  348.    * $Author: lindner $
  349. !  * $Revision: 3.5 $
  350. !  * $Date: 1993/07/27 05:27:44 $
  351.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/globals.h,v $
  352.    * $State: Exp $
  353.    *
  354. --- 1,7 ----
  355.   /********************************************************************
  356.    * $Author: lindner $
  357. !  * $Revision: 3.6 $
  358. !  * $Date: 1993/08/04 22:12:37 $
  359.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/globals.h,v $
  360.    * $State: Exp $
  361.    *
  362. ***************
  363. *** 15,20 ****
  364. --- 15,23 ----
  365.    *********************************************************************
  366.    * Revision History:
  367.    * $Log: globals.h,v $
  368. +  * Revision 3.6  1993/08/04  22:12:37  lindner
  369. +  * Mods to use Gpopen
  370. +  *
  371.    * Revision 3.5  1993/07/27  05:27:44  lindner
  372.    * Mondo Debug overhaul from Mitra
  373.    *
  374. ***************
  375. *** 103,108 ****
  376. --- 106,112 ----
  377.   void send_binary();
  378.   FILE *specialfile();
  379.   char *fixfile();
  380. + FILE *Gpopen();
  381.   
  382.   /*** From index.c ***/
  383.   void NeXTIndexQuery();
  384. diff -c gopher+/gopherd/index.c:3.7 gopher+/gopherd/index.c:3.8
  385. *** gopher+/gopherd/index.c:3.7    Thu Aug 12 02:24:58 1993
  386. --- gopher+/gopherd/index.c    Thu Aug 12 02:24:59 1993
  387. ***************
  388. *** 1,7 ****
  389.   /********************************************************************
  390.    * $Author: lindner $
  391. !  * $Revision: 3.7 $
  392. !  * $Date: 1993/07/27 05:27:50 $
  393.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  394.    * $State: Exp $
  395.    *
  396. --- 1,7 ----
  397.   /********************************************************************
  398.    * $Author: lindner $
  399. !  * $Revision: 3.8 $
  400. !  * $Date: 1993/08/04 22:12:43 $
  401.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $
  402.    * $State: Exp $
  403.    *
  404. ***************
  405. *** 15,20 ****
  406. --- 15,23 ----
  407.    *********************************************************************
  408.    * Revision History:
  409.    * $Log: index.c,v $
  410. +  * Revision 3.8  1993/08/04  22:12:43  lindner
  411. +  * Mods to use Gpopen
  412. +  *
  413.    * Revision 3.7  1993/07/27  05:27:50  lindner
  414.    * Mondo Debug overhaul from Mitra
  415.    *
  416. ***************
  417. *** 309,315 ****
  418.        sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir);
  419.        Debug("Grep command is %s\n", command);
  420.   
  421. !      moocow = popen(command, "r");
  422.        
  423.        if (moocow == NULL) {
  424.         writestring(sockfd, ".\r\n");
  425. --- 312,318 ----
  426.        sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir);
  427.        Debug("Grep command is %s\n", command);
  428.   
  429. !      moocow = Gpopen(command, "r");
  430.        
  431.        if (moocow == NULL) {
  432.         writestring(sockfd, ".\r\n");
  433. diff -c gopher+/gopherd/serverutil.c:3.8 gopher+/gopherd/serverutil.c:3.10
  434. *** gopher+/gopherd/serverutil.c:3.8    Thu Aug 12 02:24:59 1993
  435. --- gopher+/gopherd/serverutil.c    Thu Aug 12 02:25:00 1993
  436. ***************
  437. *** 1,7 ****
  438.   /********************************************************************
  439.    * $Author: lindner $
  440. !  * $Revision: 3.8 $
  441. !  * $Date: 1993/07/27 05:27:56 $
  442.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  443.    * $State: Exp $
  444.    *
  445. --- 1,7 ----
  446.   /********************************************************************
  447.    * $Author: lindner $
  448. !  * $Revision: 3.10 $
  449. !  * $Date: 1993/08/04 22:14:51 $
  450.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $
  451.    * $State: Exp $
  452.    *
  453. ***************
  454. *** 15,20 ****
  455. --- 15,26 ----
  456.    *********************************************************************
  457.    * Revision History:
  458.    * $Log: serverutil.c,v $
  459. +  * Revision 3.10  1993/08/04  22:14:51  lindner
  460. +  * Mods to use Gpopen
  461. +  *
  462. +  * Revision 3.9  1993/08/04  22:12:48  lindner
  463. +  * Mods to use Gpopen
  464. +  *
  465.    * Revision 3.8  1993/07/27  05:27:56  lindner
  466.    * Mondo Debug overhaul from Mitra
  467.    *
  468. ***************
  469. *** 471,473 ****
  470. --- 477,534 ----
  471.        ;
  472.   }
  473.   
  474. + FILE*
  475. + Gpopen(cmd, rw)
  476. +   char *cmd;
  477. +   char *rw;
  478. + {
  479. +      int inquote = 0;
  480. +      int i;
  481. +      /** Strip out the naughty bits..  **/
  482. +      for (i=0; cmd[i] != '\0'; i++) {
  483. +       switch (cmd[i]) {
  484. +       case '"':
  485. +            inquote = 1-inquote;
  486. +            break;
  487. +            
  488. +       case '*':
  489. +       case '&':
  490. +       case '|':
  491. +       case ';':
  492. +       case '=':
  493. +       case '?':
  494. +       case '<':
  495. +       case '>':
  496. +       case '!':
  497. +       case '(':
  498. +       case ')':
  499. +       case '{':
  500. +       case '}':
  501. +       case '[':
  502. +       case ']':
  503. +       case '^':
  504. +            /*** Stuff that's okay if quoted.. ***/
  505. +            if (!inquote) {
  506. +             LOGGopher("Possible Security Violation '%s'", cmd);
  507. +             return(NULL);
  508. +            }
  509. +            
  510. +            break;
  511. +       case '\\':
  512. +       case '`':
  513. +       case '\n':
  514. +       case '$':
  515. +            /*** Stuff that shouldn't be in there at all! **/
  516. +            LOGGopher("Possible Security Violation '%s'", cmd);
  517. +            return(NULL);
  518. +            break;
  519. +       }
  520. +      }
  521. +      return(popen(cmd, rw));
  522. + }
  523. diff -c gopher+/gopherd/special.c:3.9 gopher+/gopherd/special.c:3.11
  524. *** gopher+/gopherd/special.c:3.9    Thu Aug 12 02:25:00 1993
  525. --- gopher+/gopherd/special.c    Thu Aug 12 02:25:01 1993
  526. ***************
  527. *** 1,7 ****
  528.   /********************************************************************
  529.    * $Author: lindner $
  530. !  * $Revision: 3.9 $
  531. !  * $Date: 1993/07/27 05:27:59 $
  532.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  533.    * $State: Exp $
  534.    *
  535. --- 1,7 ----
  536.   /********************************************************************
  537.    * $Author: lindner $
  538. !  * $Revision: 3.11 $
  539. !  * $Date: 1993/08/04 22:14:54 $
  540.    * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $
  541.    * $State: Exp $
  542.    *
  543. ***************
  544. *** 15,20 ****
  545. --- 15,26 ----
  546.    *********************************************************************
  547.    * Revision History:
  548.    * $Log: special.c,v $
  549. +  * Revision 3.11  1993/08/04  22:14:54  lindner
  550. +  * Mods to use Gpopen
  551. +  *
  552. +  * Revision 3.10  1993/08/04  22:12:51  lindner
  553. +  * Mods to use Gpopen
  554. +  *
  555.    * Revision 3.9  1993/07/27  05:27:59  lindner
  556.    * Mondo Debug overhaul from Mitra
  557.    *
  558. ***************
  559. *** 150,156 ****
  560.         
  561.         Debug("Executing %s\n", buf);
  562.   
  563. !       if (! (pp = popen(buf, "r")))
  564.              return (FILE *)0;
  565.         ispipe = 1;
  566.         
  567. --- 156,162 ----
  568.         
  569.         Debug("Executing %s\n", buf);
  570.   
  571. !       if (! (pp = Gpopen(buf, "r")))
  572.              return (FILE *)0;
  573.         ispipe = 1;
  574.         
  575.