Bug 88154 - default /etc/mail/Makefile makes submit.cf unreadable by smmsp
default /etc/mail/Makefile makes submit.cf unreadable by smmsp
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sendmail (Show other bugs)
8.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Florian La Roche
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-06 23:37 EDT by Dave Miller
Modified: 2007-04-18 12:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-15 05:09:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Miller 2003-04-06 23:37:58 EDT
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 05:09:07 EDT
I have added a "umask 022" before building .cf files.

Thanks a lot for this bug-report,

Florian La Roche

Note You need to log in before you can comment on or make changes to this bug.