[comp.sources.bugs] MH 6.6 bug in rcvstore

mdb@bridge2.ESD.3Com.COM (Mark D. Baushke) (05/25/89)

Disclaimer:
	This is NOT an official patch...but where else should I have
	sent it?
MH-Version: 6.6	
mh-6.6/conf/MH:
	bin	/n/mh/bin
	bboards	off
	etc	/n/mh/etc
	mail	/usr/spool/mail
	mandir  /n/mh/man
	manuals	standard
	mts	sendmail/smtp
	options	BSD42 BSD43 BERK TTYD DUMB
	options	MHE MHRC NETWORK NFS BIND RPATHS
	options	SBACKUP='"\\043"' OVERHEAD
	ccoptions -O
	ranlib on
	pop	off
	ldoptions -O
	tma off
System: Sun-3/60, SunOS 3.5	
Description:
	When run from a process with umask 077, rcvstore does not
	properly set the file permissions since it uses creat(2) to do
	so. From the man page for creat(2):
		If the file did not exist, it is given mode mode, as
		modified by the process's mode mask (see umask(2)).
	So, to the behavior is not parallel with inc(1) which does an
	explicit chmod(2).
Priority: LOW
Fix:	Apply this patch so that rcvstore does an explicit chmod to
	the new message just like inc does.

*** mh-6.6/uip/rcvstore.c.orig	Thu Oct 29 15:02:41 1987
--- mh-6.6/uip/rcvstore.c	Wed May 24 16:48:16 1989
***************
*** 161,166 ****
--- 161,168 ----
      if ((fd = creat (cp = m_scratch ("", invo_name), m_gmprot ())) == NOTOK)
  	adios (cp, "unable to create");
  
+     (void) chmod (cp, m_gmprot ()); /* creat ANDs with umask, do it right */
+ 
      cpydata (fileno (stdin), fd, "standard input", cp);
  
      if (fstat (fd, &st) == NOTOK) {

Enjoy!
--
Mark D. Baushke
UUCP:	    {3comvax,auspex,sun}!bridge2!mdb
Internet:   <@[129.213.128.4]:mdb@bridge2.ESD.3Com.COM>
Nameserver: mdb@bridge2.ESD.3Com.COM
(We should have a secondary nameserver real soon now...leading to having our
new A (and MX) records properly being published by the root nameservers.)

kent@ssbell.UUCP (Kent Landfield) (05/25/89)

In article <MDB.89May24171553@kosciusko.ESD.3Com.COM> mdb@bridge2.ESD.3Com.COM (Mark D. Baushke) writes:
>Disclaimer:
>	This is NOT an official patch...but where else should I have
>	sent it?

It was sent to the right places as far as I can see :-). Comp.sources.bugs
is for *this* tye of patches. Official patches however *should* be sent to
the moderator of the sources newsgroup in which the software was initially
posted. [ That is, if it was initially posted to a moderated sources group.
:-( ] You might try sending a copy of this patch to the "maintainer(s)"
of MH (??) as well so as to alert them to the problem.

			-Kent+
----
Kent Landfield               UUCP:     kent@ssbell
Sterling Software FSG/IMD    INTERNET: kent%ssbell@uunet.uu.net
1404 Ft. Crook Rd. South     Phone:    (402) 291-8300 
Bellevue, NE. 68005-2969     FAX:      (402) 291-4362

nagel@paris.ics.uci.edu (Mark Nagel) (05/26/89)

In article <489@ssbell.UUCP>, kent@ssbell (Kent Landfield) writes:
|In article <MDB.89May24171553@kosciusko.ESD.3Com.COM> mdb@bridge2.ESD.3Com.COM (Mark D. Baushke) writes:
|>Disclaimer:
|>	This is NOT an official patch...but where else should I have
|>	sent it?
|
|:-( ] You might try sending a copy of this patch to the "maintainer(s)"
|of MH (??) as well so as to alert them to the problem.

There isn't really an "official" maintainer of MH, however, if you
send a bug fix to bug-mh@ics.uci.edu, it may eventually be
incorporated into the next release.  There is also a mailing list
named mh-workers@ics.uci.edu that is for folks working on MH, so that
is another good place to announce such problems.  Send requests for
additions to mh-workers to mh-workers-request@ics.uci.edu.

Mark Nagel @ UC Irvine, Department of Information and Computer Science
                            +----------------------------------------+
ARPA: nagel@ics.uci.edu     | N = 1 implies P = NP                   |
UUCP: ucbvax!ucivax!nagel   |                                        |