🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #2622

Funny behavior when mailing to programs

#2622
From: Rob Vaughn,302 Thurston Hall,506...
Date: Tue, 05 Jan 1993 21:05
43 lines
2148 bytes
I've come upon a strange problem with the sendmail daemon on our Convex
system but I suspect this also crops up using the current IDA release.
It's not a bug per se, but it has caused some serious problems and I
hope someone can enlighten me a bit on why it is happening.

Our sendmail is set up like this:

-rwsr-xr-x  1 root     bin        360049 Dec 11 00:12 /usr/lib/sendmail
   ^          ^^^^
Note setuid to 'root'.

We have an alias set up as such to save mail message in a file:

catmsgs: "|/bin/cat >> /c/src/documents/msgs"

which had the following permissions:

-rw-rw----  1 root   mscadm       9258 Jan  5 12:57 /c/src/documents/msgs

Since my user account is a member of group 'mscadm' I had no problem using
this alias - mail sent to it would be appended to the file thru 'cat'.
But when I try it from 'root', or when cron tries to use this, it fails
in strange ways, ultimately resulting in "554: Illegal mailer error 1".

I finally worked out that when the "prog" mailer is used, sendmail is
executing the program as the user sending the mail, unless that user is
running as 'root' in which case it runs the program as 'daemon'.  When I
changed the ownership of the file above to 'daemon' the problems went
away.

Is my understanding of this correct?  Can anyone explain a little better
what is going on?  I have yet to see any mention of this in any
documentation, and I'm worried that I don't really understand the 
ramifications of this.  Is this a "feature" of some sort?

Thanks,
Rob

-- 

Rob Vaughn, Fugitive Systems Guy
Mat. Sci. Center Computing, Cornell University
rob@msc.cornell.edu - rob@crnlmsc2.bitnet
Technical Details
Message-ID: <1993Jan5.210513.6819@msc.cornell.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!caen!batcomputer!lynx@msc.cornell.edu!rob

Show Full Headers
Complete Article Headers
Newsgroups: comp.mail.sendmail
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!caen!batcomputer!lynx@msc.cornell.edu!rob
From: rob@lynx.msc.cornell.edu.UUCP (Rob Vaughn,302 Thurston Hall,50637,2730428)
Subject: Funny behavior when mailing to programs
Message-ID: <1993Jan5.210513.6819@msc.cornell.edu>
Originator: rob@snoopy.msc.cornell.edu
Sender: news@msc.cornell.edu
Organization: Cornell-Materials-Science-Center
Date: Tue, 5 Jan 1993 21:05:13 GMT
Lines: 43