diff -c gopher+/conf.h:3.5 gopher+/conf.h:3.6 *** gopher+/conf.h:3.5 Thu Aug 12 02:24:43 1993 --- gopher+/conf.h Thu Aug 12 02:24:43 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.5 $ ! * $Date: 1993/07/27 05:35:30 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.6 $ ! * $Date: 1993/08/04 22:07:42 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/conf.h,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,23 ---- ********************************************************************* * Revision History: * $Log: conf.h,v $ + * Revision 3.6 1993/08/04 22:07:42 lindner + * Use /bin/mail instead of ucbmail + * * Revision 3.5 1993/07/27 05:35:30 lindner * reading material for VMS, dead code removal * *************** *** 76,85 **** #define PLAY_COMMAND "play -v 40 -" #endif - #if defined(hpux) || defined(_AUX_SOURCE) || defined(_SEQUENT_) || defined(USG) - #define MAIL_COMMAND "mailx" - #endif - #if defined(REMOTEUSER) #define PAGER_COMMAND "Less -f -r" #endif --- 79,84 ---- *************** *** 131,137 **** #endif #ifndef MAIL_COMMAND ! #define MAIL_COMMAND "mail" #endif #ifndef TELNET_COMMAND --- 130,136 ---- #endif #ifndef MAIL_COMMAND ! #define MAIL_COMMAND "/bin/mail" #endif #ifndef TELNET_COMMAND diff -c gopher+/doc/client.changes:3.6 gopher+/doc/client.changes:3.7 *** gopher+/doc/client.changes:3.6 Thu Aug 12 02:24:46 1993 --- gopher+/doc/client.changes Thu Aug 12 02:24:46 1993 *************** *** 1,4 **** ! $Id: client.changes,v 3.6 1993/08/03 21:02:03 lindner Exp $ Gopher+2.0 patchlevel 1 ----------------------- --- 1,14 ---- ! $Id: client.changes,v 3.7 1993/08/04 22:23:41 lindner Exp $ ! ! Gopher+2.0 patchlevel 2 ! ----------------------- ! ! * Use /bin/mail instead of ucbmail ! ! * Rebuild client if patchlevel.h changes ! ! * Fix for problems with '=' and '?' and /bin/mail Gripe mods ! Gopher+2.0 patchlevel 1 ----------------------- diff -c gopher+/doc/server.changes:3.6 gopher+/doc/server.changes:3.7 *** gopher+/doc/server.changes:3.6 Thu Aug 12 02:24:47 1993 --- gopher+/doc/server.changes Thu Aug 12 02:24:48 1993 *************** *** 1,4 **** ! $Id: server.changes,v 3.6 1993/08/03 21:03:45 lindner Exp $ Gopher 2.0 patchlevel 1 --- 1,11 ---- ! $Id: server.changes,v 3.7 1993/08/04 22:23:45 lindner Exp $ ! ! Gopher 2.0 patchlevel 2 ! ----------------------- ! ! * Rebuild server if patchlevel.h changes ! ! * Mods to use secure popen Gopher 2.0 patchlevel 1 diff -c gopher+/gopher/Makefile:3.4 gopher+/gopher/Makefile:3.5 *** gopher+/gopher/Makefile:3.4 Thu Aug 12 02:24:51 1993 --- gopher+/gopher/Makefile Thu Aug 12 02:24:51 1993 *************** *** 1,7 **** #******************************************************************** # $Author: lindner $ ! # $Revision: 3.4 $ ! # $Date: 1993/07/27 05:28:45 $ # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/Makefile,v $ # $State: Exp $ # --- 1,7 ---- #******************************************************************** # $Author: lindner $ ! # $Revision: 3.5 $ ! # $Date: 1993/08/04 22:06:35 $ # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/Makefile,v $ # $State: Exp $ # *************** *** 15,20 **** --- 15,23 ---- #********************************************************************* # Revision History: # $Log: Makefile,v $ + # Revision 3.5 1993/08/04 22:06:35 lindner + # Rebuild client if patchlevel.h changes + # # Revision 3.4 1993/07/27 05:28:45 lindner # Mondo Debug overhaul from Mitra # *************** *** 76,78 **** --- 79,83 ---- $(OBJS): gopher.h ../conf.h globals.o: globals.h + gopherrc.o: ../patchlevel.h + manager.o: ../patchlevel.h diff -c gopher+/gopher/gopher.c:3.25 gopher+/gopher/gopher.c:3.26 *** gopher+/gopher/gopher.c:3.25 Thu Aug 12 02:24:52 1993 --- gopher+/gopher/gopher.c Thu Aug 12 02:24:52 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.25 $ ! * $Date: 1993/08/03 20:48:27 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.26 $ ! * $Date: 1993/08/04 22:08:47 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,23 ---- ********************************************************************* * Revision History: * $Log: gopher.c,v $ + * Revision 3.26 1993/08/04 22:08:47 lindner + * Fix for problems with '=' and '?' and /bin/mail Gripe mods + * * Revision 3.25 1993/08/03 20:48:27 lindner * Audio file fix from jqj * *************** *** 273,281 **** return; } ! sprintf(mailcmd, "%s -s \"%s\" %s", MAIL_COMMAND, gripemess[0], email); f = popen(mailcmd, "w"); for (i=1; i< 10; i++) { fprintf(f, "%s\n", gripemess[i]); free(gripemess[i]); --- 276,290 ---- return; } ! sprintf(mailcmd, "%s %s", MAIL_COMMAND, email); f = popen(mailcmd, "w"); + if (f == NULL) { + CursesErrorMsg("Cannot send mail..."); + return; + } + + fprintf(f, "Subject: %s\n\n", gripemess[0]); for (i=1; i< 10; i++) { fprintf(f, "%s\n", gripemess[i]); free(gripemess[i]); *************** *** 519,525 **** char *view = NULL; boolean WritePipe = FALSE, ForkOff = FALSE; ! boolean GS2FileSucceeded; int Child; DebugGSplusPrint(ZeGopher, "showfile:start"); --- 528,534 ---- char *view = NULL; boolean WritePipe = FALSE, ForkOff = FALSE; ! boolean GS2FileSucceeded = TRUE; int Child; DebugGSplusPrint(ZeGopher, "showfile:start"); diff -c gopher+/gopher/ourutils.c:3.18 gopher+/gopher/ourutils.c:3.19 *** gopher+/gopher/ourutils.c:3.18 Thu Aug 12 02:24:53 1993 --- gopher+/gopher/ourutils.c Thu Aug 12 02:24:54 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.18 $ ! * $Date: 1993/08/03 04:43:59 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.19 $ ! * $Date: 1993/08/04 22:07:23 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,23 ---- ********************************************************************* * Revision History: * $Log: ourutils.c,v $ + * Revision 3.19 1993/08/04 22:07:23 lindner + * Use /bin/mail instead of ucbmail + * * Revision 3.18 1993/08/03 04:43:59 lindner * Fix for VMS unresolved variables * *************** *** 167,172 **** --- 170,177 ---- { static char *SaveName = NULL; char command[512]; + FILE *infile, *mailit; + char buf[512]; if (SaveName==NULL) { if ((SaveName = (char *) malloc(sizeof(char)*256)) == NULL) *************** *** 200,210 **** #ifdef VMS sprintf(command, "%s/subject=\"%s\" %s %s", MAIL_COMMAND, Realname, Filename, SaveName); #else ! sprintf(command, "%s -s \"%s\" %s < %s", ! MAIL_COMMAND, Realname, SaveName, Filename); #endif - system(command); } --- 205,229 ---- #ifdef VMS sprintf(command, "%s/subject=\"%s\" %s %s", MAIL_COMMAND, Realname, Filename, SaveName); + system(command); #else ! sprintf(command, "%s %s", ! MAIL_COMMAND, SaveName); ! ! infile = fopen(Filename, "r"); ! mailit = popen(command, "w"); ! ! fprintf(mailit, "Subject: %s\n\n", Realname); ! ! while (readline(fileno(infile), buf, sizeof(buf))) { ! twirl(); ! fprintf(mailit, "%s", buf); ! } ! ! pclose(mailit); ! fclose(infile); ! #endif } diff -c gopher+/gopherd/Makefile:3.5 gopher+/gopherd/Makefile:3.6 *** gopher+/gopherd/Makefile:3.5 Thu Aug 12 02:24:57 1993 --- gopher+/gopherd/Makefile Thu Aug 12 02:24:57 1993 *************** *** 1,7 **** #******************************************************************** # $Author: lindner $ ! # $Revision: 3.5 $ ! # $Date: 1993/07/27 05:27:34 $ # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $ # $State: Exp $ # --- 1,7 ---- #******************************************************************** # $Author: lindner $ ! # $Revision: 3.6 $ ! # $Date: 1993/08/04 22:12:01 $ # $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/Makefile,v $ # $State: Exp $ # *************** *** 15,20 **** --- 15,23 ---- #********************************************************************* # Revision History: # $Log: Makefile,v $ + # Revision 3.6 1993/08/04 22:12:01 lindner + # Rebuild server if patchlevel.h changes + # # Revision 3.5 1993/07/27 05:27:34 lindner # Mondo Debug overhaul from Mitra # *************** *** 101,107 **** waisgopher.o: waisgopher.c $(CC) $(CCFLAGS) -c waisgopher.c ! gopherd.o: gopherd.c $(CC) $(CCFLAGS) -DCONF_FILE=\"$(SERVERDIR)/gopherd.conf\" -c gopherd.c --- 104,110 ---- waisgopher.o: waisgopher.c $(CC) $(CCFLAGS) -c waisgopher.c ! gopherd.o: gopherd.c ../patchlevel.h $(CC) $(CCFLAGS) -DCONF_FILE=\"$(SERVERDIR)/gopherd.conf\" -c gopherd.c diff -c gopher+/gopherd/globals.h:3.5 gopher+/gopherd/globals.h:3.6 *** gopher+/gopherd/globals.h:3.5 Thu Aug 12 02:24:57 1993 --- gopher+/gopherd/globals.h Thu Aug 12 02:24:58 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.5 $ ! * $Date: 1993/07/27 05:27:44 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/globals.h,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.6 $ ! * $Date: 1993/08/04 22:12:37 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/globals.h,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,23 ---- ********************************************************************* * Revision History: * $Log: globals.h,v $ + * Revision 3.6 1993/08/04 22:12:37 lindner + * Mods to use Gpopen + * * Revision 3.5 1993/07/27 05:27:44 lindner * Mondo Debug overhaul from Mitra * *************** *** 103,108 **** --- 106,112 ---- void send_binary(); FILE *specialfile(); char *fixfile(); + FILE *Gpopen(); /*** From index.c ***/ void NeXTIndexQuery(); diff -c gopher+/gopherd/index.c:3.7 gopher+/gopherd/index.c:3.8 *** gopher+/gopherd/index.c:3.7 Thu Aug 12 02:24:58 1993 --- gopher+/gopherd/index.c Thu Aug 12 02:24:59 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.7 $ ! * $Date: 1993/07/27 05:27:50 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.8 $ ! * $Date: 1993/08/04 22:12:43 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,23 ---- ********************************************************************* * Revision History: * $Log: index.c,v $ + * Revision 3.8 1993/08/04 22:12:43 lindner + * Mods to use Gpopen + * * Revision 3.7 1993/07/27 05:27:50 lindner * Mondo Debug overhaul from Mitra * *************** *** 309,315 **** sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir); Debug("Grep command is %s\n", command); ! moocow = popen(command, "r"); if (moocow == NULL) { writestring(sockfd, ".\r\n"); --- 312,318 ---- sprintf(command, "egrep \"%s\" \"%s\"/*", Searchstr, Indexdir); Debug("Grep command is %s\n", command); ! moocow = Gpopen(command, "r"); if (moocow == NULL) { writestring(sockfd, ".\r\n"); diff -c gopher+/gopherd/serverutil.c:3.8 gopher+/gopherd/serverutil.c:3.10 *** gopher+/gopherd/serverutil.c:3.8 Thu Aug 12 02:24:59 1993 --- gopher+/gopherd/serverutil.c Thu Aug 12 02:25:00 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.8 $ ! * $Date: 1993/07/27 05:27:56 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.10 $ ! * $Date: 1993/08/04 22:14:51 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,26 ---- ********************************************************************* * Revision History: * $Log: serverutil.c,v $ + * Revision 3.10 1993/08/04 22:14:51 lindner + * Mods to use Gpopen + * + * Revision 3.9 1993/08/04 22:12:48 lindner + * Mods to use Gpopen + * * Revision 3.8 1993/07/27 05:27:56 lindner * Mondo Debug overhaul from Mitra * *************** *** 471,473 **** --- 477,534 ---- ; } + FILE* + Gpopen(cmd, rw) + char *cmd; + char *rw; + { + int inquote = 0; + int i; + + /** Strip out the naughty bits.. **/ + for (i=0; cmd[i] != '\0'; i++) { + switch (cmd[i]) { + case '"': + inquote = 1-inquote; + break; + + case '*': + case '&': + case '|': + case ';': + case '=': + case '?': + case '<': + case '>': + case '!': + case '(': + case ')': + case '{': + case '}': + case '[': + case ']': + case '^': + /*** Stuff that's okay if quoted.. ***/ + + if (!inquote) { + LOGGopher("Possible Security Violation '%s'", cmd); + return(NULL); + } + + break; + + case '\\': + case '`': + case '\n': + case '$': + /*** Stuff that shouldn't be in there at all! **/ + + LOGGopher("Possible Security Violation '%s'", cmd); + return(NULL); + + break; + } + } + + return(popen(cmd, rw)); + } diff -c gopher+/gopherd/special.c:3.9 gopher+/gopherd/special.c:3.11 *** gopher+/gopherd/special.c:3.9 Thu Aug 12 02:25:00 1993 --- gopher+/gopherd/special.c Thu Aug 12 02:25:01 1993 *************** *** 1,7 **** /******************************************************************** * $Author: lindner $ ! * $Revision: 3.9 $ ! * $Date: 1993/07/27 05:27:59 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $ * $State: Exp $ * --- 1,7 ---- /******************************************************************** * $Author: lindner $ ! * $Revision: 3.11 $ ! * $Date: 1993/08/04 22:14:54 $ * $Source: /tmp_mnt/home/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v $ * $State: Exp $ * *************** *** 15,20 **** --- 15,26 ---- ********************************************************************* * Revision History: * $Log: special.c,v $ + * Revision 3.11 1993/08/04 22:14:54 lindner + * Mods to use Gpopen + * + * Revision 3.10 1993/08/04 22:12:51 lindner + * Mods to use Gpopen + * * Revision 3.9 1993/07/27 05:27:59 lindner * Mondo Debug overhaul from Mitra * *************** *** 150,156 **** Debug("Executing %s\n", buf); ! if (! (pp = popen(buf, "r"))) return (FILE *)0; ispipe = 1; --- 156,162 ---- Debug("Executing %s\n", buf); ! if (! (pp = Gpopen(buf, "r"))) return (FILE *)0; ispipe = 1;