🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.misc
Article #278

Re: Patching SMail (was Re: Can I use the "filter" program? Probably.)

#278
From: C. Harald Koch
Date: Thu, 15 Jun 1989 17:43
35 lines
2405 bytes
In article <1989Jun14.125010.21078@ateng.com> chip@ateng.com (Chip Salzenberg) writes:
>>	A person I know has made a simple patch to smail 2.5
>>	which allows it to support "|program" aliases.
>>
>>	If people are interested I will try to get him to
>>	post his changes to tne net.
>
>I just want to warn everyone that I did exactly that, once.  However, if the
>patch is "simple" then its security must be little or none.  Do you want a
>feature if it lets your users execute arbitrary programs as "uucp"?

I am the person who wrote the patch that Bruce is talking about. I would
naturally prefer to use deliver, but then I would have to port deliver to
the Amiga, which is as non-trivial as porting SMail was.

The patch does *not* allow arbitrary users to execute arbitrary commands.
My patch automatically rejects any addresses given to SMail which contain
the '|' character.

"|command" only works from the aliases file. (Of course, if this file is
world writable, then you still have a security problem...). Another problem
is that the command runs as the user who ran SMail (often uucp, sometimes
root) so you have to be careful when writing the commands.

This was secure enough for my application, namely a two-user Amiga system.
The patch really is quite simple; change deliver() to skip directly to
popen() if the first character of an address is a '|', and change alias() to
ignore all initial addresses containing '|'. About 10 lines of code
altogether.

-- 
Grandpa Charnock's Law:	 | C. Harald Koch  NTT Systems, Inc., Toronto, Ontario
You never really learn	 | chk@gpu.utcs.utoronto.ca	   (long-term address)
to swear until you learn | chk@zorac.dciem.dnd.ca	      (my current job)
to drive.		 | chk@chkent.UUCP		    (my AMIGA at home)
Technical Details
Message-ID: <1827@dciem.dciem.dnd.ca>
Path: arc1-ca.pugleaf.net!utzoo!dciem!chk
References: <778@cjsa.WA.COM> <1989Jun1.193715.908@ateng.ateng.com> <14320@pasteur.Berkeley.EDU> <259@ethz-inf.UUCP> <1989Jun7.104600.25715@ateng.ateng.com> <587@becker.UUCP> <1989Jun14.125010.21078@ateng.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!dciem!chk
From: chk@dciem.dciem.dnd.ca (C. Harald Koch)
Newsgroups: comp.mail.misc
Subject: Re: Patching SMail (was Re: Can I use the "filter" program? Probably.)
Keywords: elm filter smail sendmail deliver
Message-ID: <1827@dciem.dciem.dnd.ca>
Date: 15 Jun 89 17:43:09 GMT
References: <778@cjsa.WA.COM> <1989Jun1.193715.908@ateng.ateng.com> <14320@pasteur.Berkeley.EDU> <259@ethz-inf.UUCP> <1989Jun7.104600.25715@ateng.ateng.com> <587@becker.UUCP> <1989Jun14.125010.21078@ateng.com>
Reply-To: chk@dretor.dciem.dnd.ca (C. Harald Koch)
Organization: NTT Systems, Inc., Toronto, Canada
Lines: 35