Bug 25715

Summary: Failure in sendmail.cf creation leaves temp files behind.
Product: Base System Reporter: Rob Simmons <rsimmons>
Component: confAssignee: Gregory Neil Shapiro <gshapiro>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Rob Simmons 2001-03-12 00:00:01 UTC
When you use the new Makefile in /etc/mail to create a cf file with 'make cf' and you have set DOMAIN() to a domain that does not have a corrosponding m4 file in /usr/share/sendmail/cf/domain the process will not complete (which is ok), but it leaves its temporary m4 file in /tmp without removing it.

Fix: 

I'm not an m4 expert, I'm not sure how to fix this problem.
How-To-Repeat: In the file /etc/mail/freebsd.mc change the line DOMAIN(generic) to DOMAIN(test) and make sure that /usr/share/sendmail/cf/domain/test.m4 does not exist.  Now run 'make cf' in /etc/mail.  You will get the following error:
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 freebsd.mc > freebsd.cf
m4: /usr/share/sendmail/cf/domain/test.m4: No such file or directory
*** Error code 1

Stop in /etc/mail.

Now go look in /tmp and you will find a directory that starts with m4 and contains a temporary m4 file.  After the 'make cf' this file should be cleaned out of /tmp, but it is not.
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2001-03-12 00:12:58 UTC
Responsible Changed
From-To: freebsd-bugs->gshapiro

Greg is Mr. Sendmail
Comment 2 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-04-16 19:36:43 UTC
State Changed
From-To: open->feedback

This was actually an m4 bug, not a sendmail bug.  m4 would not clean up 
after itself if it exited prematurely.  A fix has been committed to 
the HEAD (-CURRENT).  If all goes well, it will be MFC'ed to RELENG_4.
Comment 3 Gregory Neil Shapiro freebsd_committer freebsd_triage 2001-05-12 04:13:11 UTC
State Changed
From-To: feedback->closed

The fix to m4 has been MFC'ed into RELENG_4 (-STABLE).