Path: utzoo!attcan!uunet!husc6!think!ames!ucsd!ucsdhub!jack!elgar!ag
From: ag@elgar.UUCP (Keith Gabryelski)
Newsgroups: comp.sources.bugs
Subject: patch to "send" program
Summary: didn't update sends file properly
Keywords: send
Message-ID: <194@elgar.UUCP>
Date: 22 Jun 88 17:09:26 GMT
References: <4677@vdsvax.steinmetz.ge.com>
Reply-To: ag@elgar.UUCP (Keith Gabryelski)
Organization: Elgar Corporation, San Diego, CA
Lines: 34


   Date: 20 Jun 88 12:58:44 EDT (Mon)
   From: flash@lehi3b15.UUCP (Stephen Corbesero)

   I just compiled and installed the send (et al) stuff.  I am running on a
   System V, R2.1 (AT&T 3B15), and it does not seem to write to the .sends
   file properly for another user.  I create the .sends with a 622 protection,
   but the system only works properly if i send/reply to/from myself.

It is a bug in send.c.  I used "a+" instead of "a" in the fopen() for
the sends file.

I seemed to have done this in another place, also.  A patch for send.c
follows.

-------------------------------------------------------------------------
501c501
< 				if ((fp = fopen(sends_filename, "a+")) !=
---
> 				if ((fp = fopen(sends_filename, "a")) !=
574c574
< 	if ((fp = fopen(dead_filename, "a+")) != (FILE *)NULL)
---
> 	if ((fp = fopen(dead_filename, "a")) != (FILE *)NULL)
--------------------------------------------------------------------------
pax, Keith
--- 
  "If green is all there is to be, then green is good enough for me" - ktf
[  Keith   ]  UUCP: {ucsd, cbosgd!crash, sdcsvax!crash, nosc!crash}!elgar!ag
[Gabryelski]  INET: ag@elgar.cts.com                 ARPA: elgar!ag@ucsd.edu
-- 
  "If green is all there is to be, then green is good enough for me" - ktf
[  Keith   ]  UUCP: {ucsd, cbosgd!crash, sdcsvax!crash, nosc!crash}!elgar!ag
[Gabryelski]  INET: ag@elgar.cts.com                 ARPA: elgar!ag@ucsd.edu