Bug 88154

Summary: default /etc/mail/Makefile makes submit.cf unreadable by smmsp
Product: [Retired] Red Hat Linux Reporter: Dave Miller <justdave>
Component: sendmailAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-15 09:09:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Miller 2003-04-07 03:37:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a)
Gecko/20030325

Description of problem:
When running make in /etc/mail, the submit.cf file becomes owned by root:root,
and permissions set to whatever umask the root user was operating in at the
time.  I'm not sure whether ours is using the default or not, but our root
user's default umask is 77.  This produces a submit.cf file that is mode 600,
owned by root, and thus can't be read by the smmsp user when users submit mail
locally.

I fixed this locally with the following changes to the Makefile:

-%.cf: %.mc
+sendmail.cf : sendmail.mc
+       @if test -f /usr/share/sendmail-cf/m4/cf.m4; then \
+               mv -f $@ $@.bak; \
+               m4 $< > $@; \
+       fi;
+
+submit.cf : submit.mc
        @if test -f /usr/share/sendmail-cf/m4/cf.m4; then \
+                umask 22; \
                mv -f $@ $@.bak; \
                m4 $< > $@; \
        fi;


Version-Release number of selected component (if applicable):
sendmail-8.12.8-5.80

How reproducible:
Always

Steps to Reproduce:
1. umask 77
2. cd /etc/mail
3. make
4. sendmail -ti (or submit a webform that emails)
5. (submit an email)

Actual Results:  Apr  6 19:28:44 sinclair sendmail[14608]: NOQUEUE:
SYSERR(apache): /etc/mail/submit.cf: line 0: cannot open: Permission denied

Expected Results:  mail is delivered.

Additional info:

classifying as "loss of data" since this causes locally submitted mail to fail.

Comment 1 Florian La Roche 2003-04-15 09:09:07 UTC
I have added a "umask 022" before building .cf files.

Thanks a lot for this bug-report,

Florian La Roche