home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume24 / elm2.3patches / part10 < prev    next >
Encoding:
Internet Message Format  |  1991-03-05  |  12.5 KB

  1. Subject:  v24i034:  Elm mail system, release 2.3, patches, Part10/11
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 58dc4f17 c5bd09e2 004fc601 b13f0847
  5.  
  6. Submitted-by: Syd Weinstein <syd@DSI.COM>
  7. Posting-number: Volume 24, Issue 34
  8. Archive-name: elm2.3patches/part10
  9.  
  10. Subject: elm 2.3 Patch #10
  11. Summary: This is an official patch for elm 2.3 system.  Please apply it.
  12. Priority: HIGH
  13.  
  14. This patch fixes the deleted line that causes the Segmentation
  15. Violation.
  16.  
  17. Add back missing line in length check
  18. From: Syd
  19.  
  20. Revision 4.1.1.1  90/12/19  09:44:06  syd
  21. Fix not checking for mail before scanning
  22. From: Syd via report from Joern Lubkoll
  23.  
  24. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  25.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  26.     If you don't have the patch program, apply the following by hand,
  27.     or get patch (version 2.0, latest patchlevel).
  28.  
  29.     After patching:
  30.         make
  31.         make install
  32.  
  33.     If patch indicates that patchlevel is the wrong version, you may need
  34.     to apply one or more previous patches, or the patch may already
  35.     have been applied.  See the patchlevel.h file to find out what has or
  36.     has not been applied.  In any event, don't continue with the patch.
  37.  
  38.     If you are missing previous patches they can be obtained from our:
  39.     archive server.
  40.  
  41.     Syd Weinstein
  42.     elm@DSI.COM
  43.  
  44.     The patches are available from the dsinc archive server
  45.     Send the following message to archive-server@DSI.COM for
  46.     a list of available patches:
  47.  
  48.     Subject: patch list
  49.     send index elm
  50.  
  51. Index: hdrs/patchlevel.h
  52. Prereq: 9
  53. *** ../elm2.3/hdrs/patchlevel.h    Wed Dec  5 23:42:02 1990
  54. --- hdrs/patchlevel.h    Wed Dec 19 09:52:11 1990
  55. ***************
  56. *** 1 ****
  57. ! #define PATCHLEVEL 9
  58. --- 1 ----
  59. ! #define PATCHLEVEL 10
  60.  
  61. Index: Patchlist
  62. *** ../elm2.3/Patchlist    Wed Dec  5 23:42:04 1990
  63. --- Patchlist    Wed Dec 19 09:53:21 1990
  64. ***************
  65. *** 1,4 ****
  66. --- 1,12 ----
  67.       Elm 2.3 Patch 9 - More bug/portability fixes
  68. +     Wed Dec 19 09:52:45 EST 1990 (Creation date, not posting date)
  69. + Add back missing line in length check
  70. + From: Syd
  71. + Fix not checking for mail before scanning
  72. + From: Syd via report from Joern Lubkoll
  73. +     Elm 2.3 Patch 9 - More bug/portability fixes
  74.       Wed Dec  5 22:10:09 EST 1990 (Creation date, not posting date)
  75.   Add yp search to /etc/yp as well as /usr/etc/yp
  76.   From: Lee Ziegenhals
  77.  
  78. Index: src/elm.c
  79. Prereq: 4.1
  80. *** ../elm2.3/src/elm.c    Sat Apr 28 22:42:56 1990
  81. --- src/elm.c    Wed Dec 19 09:44:31 1990
  82. ***************
  83. *** 1,8 ****
  84.   
  85. ! static char rcsid[] = "@(#)$Id: elm.c,v 4.1 90/04/28 22:42:54 syd Exp $";
  86.   
  87.   /*******************************************************************************
  88. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  89.    *
  90.    * This file and all associated files and documentation:
  91.    *             Copyright (c) 1986, 1987 Dave Taylor
  92. --- 1,8 ----
  93.   
  94. ! static char rcsid[] = "@(#)$Id: elm.c,v 4.1.1.1 90/12/19 09:44:06 syd Exp $";
  95.   
  96.   /*******************************************************************************
  97. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  98.    *
  99.    * This file and all associated files and documentation:
  100.    *             Copyright (c) 1986, 1987 Dave Taylor
  101. ***************
  102. *** 15,20 ****
  103. --- 15,24 ----
  104.    *
  105.    *******************************************************************************
  106.    * $Log:    elm.c,v $
  107. +  * Revision 4.1.1.1  90/12/19  09:44:06  syd
  108. +  * Fix not checking for mail before scanning
  109. +  * From: Syd via report from Joern Lubkoll
  110. +  * 
  111.    * Revision 4.1  90/04/28  22:42:54  syd
  112.    * checkin of Elm 2.3 as of Release PL0
  113.    * 
  114. ***************
  115. *** 221,231 ****
  116.                  }
  117.                  break;
  118.   
  119. !         case '/'    :  if (pattern_match())
  120.                    nucurr = get_page(current);
  121.                  else {
  122. !                   error("pattern not found!");
  123. !                   fflush(stdin);
  124.                  }
  125.                  break;
  126.   
  127. --- 225,240 ----
  128.                  }
  129.                  break;
  130.   
  131. !         case '/'    :  /* scan mbox for string */
  132. !                if  (message_count < 1) {
  133. !                  error("No mail to scan!");
  134. !                  fflush(stdin);
  135. !                }
  136. !                else if (pattern_match())
  137.                    nucurr = get_page(current);
  138.                  else {
  139. !                  error("pattern not found!");
  140. !                  fflush(stdin);
  141.                  }
  142.                  break;
  143.   
  144.  
  145. Index: src/leavembox.c
  146. Prereq: 4.1.1.5
  147. *** ../elm2.3/src/leavembox.c    Wed Oct 10 13:11:13 1990
  148. --- src/leavembox.c    Thu Dec  6 13:39:56 1990
  149. ***************
  150. *** 1,8 ****
  151.   
  152. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.5 90/10/10 12:49:46 syd Exp $";
  153.   
  154.   /*******************************************************************************
  155. !  *  The Elm Mail System  -  $Revision: 4.1.1.5 $   $State: Exp $
  156.    *
  157.    *             Copyright (c) 1986, 1987 Dave Taylor
  158.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  159. --- 1,8 ----
  160.   
  161. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.6 90/12/06 13:38:55 syd Exp $";
  162.   
  163.   /*******************************************************************************
  164. !  *  The Elm Mail System  -  $Revision: 4.1.1.6 $   $State: Exp $
  165.    *
  166.    *             Copyright (c) 1986, 1987 Dave Taylor
  167.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  168. ***************
  169. *** 14,19 ****
  170. --- 14,23 ----
  171.    *
  172.    *******************************************************************************
  173.    * $Log:    leavembox.c,v $
  174. +  * Revision 4.1.1.6  90/12/06  13:38:55  syd
  175. +  * disable stop signal around writeback to avoid corrupted file
  176. +  * From: Syd via report from Tom Davis <tdd@endure.cl.msu.edu>
  177. +  * 
  178.    * Revision 4.1.1.5  90/10/10  12:49:46  syd
  179.    * Fix calling sequence to copy_message calls for
  180.    * new MMDF argument
  181. ***************
  182. *** 120,125 ****
  183. --- 124,134 ----
  184.   #else
  185.       struct utimbuf utime_buffer;    /* utime command */
  186.   #endif
  187. + #ifdef VOIDSIG
  188. +     void    (*oldstop)();
  189. + #else
  190. +     int    (*oldstop)();
  191. + #endif
  192.       register int to_delete = 0, to_store = 0, to_keep = 0, i,
  193.                marked_deleted, marked_read, marked_unread,
  194.                last_sortby, ask_questions,  asked_storage_q,
  195. ***************
  196. *** 377,382 ****
  197. --- 386,395 ----
  198.       
  199.       /* Everything's GO - so ouput that user message and go to it. */
  200.   
  201. + #ifdef SIGTSTP
  202. +     oldstop = signal(SIGTSTP, SIGIGN);
  203. + #endif
  204. +     
  205.       dprint(2, (debugfile, "Action: %s\n", buffer));
  206.       error(buffer);
  207.   
  208. ***************
  209. *** 392,397 ****
  210. --- 405,413 ----
  211.           dprint(1, (debugfile, "** %s - %s **\n", error_name(errno),
  212.             error_description(errno)));
  213.           unlock();
  214. + #ifdef SIGTSTP
  215. +         signal(SIGTSTP, oldstop);
  216. + #endif
  217.           return(0);
  218.         }
  219.         if ((temp = fopen(recvd_mail,"a")) == NULL) {
  220. ***************
  221. *** 432,437 ****
  222. --- 448,456 ----
  223.           dprint(1, (debugfile, "** %s - %s **\n", error_name(errno),
  224.             error_description(errno)));
  225.           unlock();
  226. + #ifdef SIGTSTP
  227. +         signal(SIGTSTP, oldstop);
  228. + #endif
  229.           return(0);
  230.         }
  231.         if ((temp = fopen(temp_keep_file,"w")) == NULL) {
  232. ***************
  233. *** 468,473 ****
  234. --- 487,495 ----
  235.          * simply remove the old original folder and that's it!
  236.          */
  237.         (void)unlink(cur_folder);
  238. + #ifdef SIGTSTP
  239. +       signal(SIGTSTP, oldstop);
  240. + #endif
  241.         return(1);
  242.       }
  243.   
  244. ***************
  245. *** 610,615 ****
  246. --- 632,640 ----
  247.       mailfile_size = bytes(cur_folder);
  248.       unlock();    /* remove the lock on the file ASAP! */
  249.   
  250. + #ifdef SIGTSTP
  251. +     signal(SIGTSTP, oldstop);
  252. + #endif
  253.       return(1);    
  254.   }
  255.   
  256.  
  257. Index: src/returnadd.c
  258. Prereq: 4.1.1.2
  259. *** ../elm2.3/src/returnadd.c    Wed Dec  5 23:42:09 1990
  260. --- src/returnadd.c    Tue Dec 11 15:36:10 1990
  261. ***************
  262. *** 1,8 ****
  263.   
  264. ! static char rcsid[] = "@(#)$Id: returnadd.c,v 4.1.1.2 90/12/05 22:33:58 syd Exp $";
  265.   
  266.   /*******************************************************************************
  267. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  268.    *
  269.    *             Copyright (c) 1986, 1987 Dave Taylor
  270.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  271. --- 1,8 ----
  272.   
  273. ! static char rcsid[] = "@(#)$Id: returnadd.c,v 4.1.1.3 90/12/11 15:35:56 syd Exp $";
  274.   
  275.   /*******************************************************************************
  276. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  277.    *
  278.    *             Copyright (c) 1986, 1987 Dave Taylor
  279.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  280. ***************
  281. *** 14,19 ****
  282. --- 14,23 ----
  283.    *
  284.    *******************************************************************************
  285.    * $Log:    returnadd.c,v $
  286. +  * Revision 4.1.1.3  90/12/11  15:35:56  syd
  287. +  * Add back missing  strlen line, fixes segv problem
  288. +  * From: Syd
  289. +  * 
  290.    * Revision 4.1.1.2  90/12/05  22:33:58  syd
  291.    * Fix missing close brace due to indention error
  292.    * From: Syd
  293. ***************
  294. *** 295,300 ****
  295. --- 299,305 ----
  296.             buf[len_buf] = '\0';
  297.           }
  298.           strncat(buf, buf2, (SLEN-len_buf-1));
  299. +         len_buf = strlen(buf);
  300.           ok = (int) (fgets(buf2, SLEN, mailfile) != NULL);
  301.           if (ok) {
  302.             len_buf2 = strlen(buf2);
  303.  
  304. Index: utils/fastmail.c
  305. Prereq: 4.1.1.2
  306. *** ../elm2.3/utils/fastmail.c    Sun Oct  7 21:55:00 1990
  307. --- utils/fastmail.c    Thu Dec  6 10:39:21 1990
  308. ***************
  309. *** 1,8 ****
  310.   
  311. ! static char rcsid[] = "@(#)$Id: fastmail.c,v 4.1.1.2 90/10/07 20:56:25 syd Exp $";
  312.   
  313.   /*******************************************************************************
  314. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  315.    *
  316.    *             Copyright (c) 1986, 1987 Dave Taylor
  317.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  318. --- 1,8 ----
  319.   
  320. ! static char rcsid[] = "@(#)$Id: fastmail.c,v 4.1.1.3 90/12/06 10:38:55 syd Exp $";
  321.   
  322.   /*******************************************************************************
  323. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  324.    *
  325.    *             Copyright (c) 1986, 1987 Dave Taylor
  326.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  327. ***************
  328. *** 14,19 ****
  329. --- 14,23 ----
  330.    *
  331.    *******************************************************************************
  332.    * $Log:    fastmail.c,v $
  333. +  * Revision 4.1.1.3  90/12/06  10:38:55  syd
  334. +  * Fix getlogin returning null causing a core dump
  335. +  * From: Nigel Metheringham <nigelm@ohm.york.ac.uk>
  336. +  * 
  337.    * Revision 4.1.1.2  90/10/07  20:56:25  syd
  338.    * Add ifndef NO_XHEADER to X-Mailer
  339.    * From: syd via request of Frank Elsner
  340. ***************
  341. *** 101,106 ****
  342. --- 105,111 ----
  343.       char filename[SLEN], tempfilename[SLEN], command_buffer[256];
  344.       char replyto[SLEN], cc_list[SLEN], bcc_list[SLEN], to_list[SLEN];
  345.       char from_addr[SLEN];
  346. +     char *tmplogname;
  347.       int  c, sendmail_available, debug = 0;
  348.   
  349.       from_string[0] = '\0';
  350. ***************
  351. *** 156,162 ****
  352.       gethostname(hostname, sizeof(hostname));
  353.   #endif
  354.   
  355. !     strcpy(username, getlogin());
  356.   
  357.       if (strlen(username) == 0)
  358.         cuserid(username);
  359. --- 161,171 ----
  360.       gethostname(hostname, sizeof(hostname));
  361.   #endif
  362.   
  363. !     tmplogname = getlogin();
  364. !     if (tmplogname != NULL)
  365. !       strcpy(username, tmplogname);
  366. !     else
  367. !       username[0] = '\0';
  368.   
  369.       if (strlen(username) == 0)
  370.         cuserid(username);
  371.  
  372. Index: utils/newalias.c
  373. Prereq: 4.1.1.2
  374. *** ../elm2.3/utils/newalias.c    Wed Aug 15 23:51:42 1990
  375. --- utils/newalias.c    Thu Dec  6 10:24:07 1990
  376. ***************
  377. *** 1,8 ****
  378.   
  379. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.2 90/08/02 21:57:58 syd Exp $";
  380.   
  381.   /*******************************************************************************
  382. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  383.    *
  384.    *             Copyright (c) 1986, 1987 Dave Taylor
  385.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  386. --- 1,8 ----
  387.   
  388. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.3 90/12/06 10:23:22 syd Exp $";
  389.   
  390.   /*******************************************************************************
  391. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  392.    *
  393.    *             Copyright (c) 1986, 1987 Dave Taylor
  394.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  395. ***************
  396. *** 14,19 ****
  397. --- 14,23 ----
  398.    *
  399.    *******************************************************************************
  400.    * $Log:    newalias.c,v $
  401. +  * Revision 4.1.1.3  90/12/06  10:23:22  syd
  402. +  * Prevent newalias from trying to process lines without two = signs
  403. +  * From: Syd via report from integow!ronald
  404. +  * 
  405.    * Revision 4.1.1.2  90/08/02  21:57:58  syd
  406.    * The newly introduced function 'stricmp' has a name conflict with a libc
  407.    * function under SunOS 4.1.  Changed name to istrcmp.
  408. ***************
  409. *** 234,239 ****
  410. --- 238,254 ----
  411.       char comment[LONG_STRING], c;
  412.       int  first, last, i = 0, j = 0;
  413.   
  414. +     /* check for two = signs */
  415. +     for (i = 0, j = 0; buffer[i]; i++)
  416. +         if (buffer[i] == '=')
  417. +         j++;
  418. +     if (j < 2) {
  419. +         printf("Error - alias data line is not in proper format:\n'%s'\n", buffer);
  420. +         error++;
  421. +         return;
  422. +     }
  423. +      
  424.       remove_all(' ', TAB, buffer);
  425.   
  426.       for (i=0; buffer[i] != '=' && i < LONG_STRING; i++)
  427.  
  428. exit 0 # Just in case...
  429.