Re: [Exim] Conditionalize a router on file existance; effect…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Harald Meland
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Conditionalize a router on file existance; effective uid and NFS woes
On Wed, 6 Aug 2003, Harald Meland wrote:

> As I now have realized that this solution is indeed not secure
> (although it's no worse than the situation we've had until now, with
> Exim < 4), I'll have a look at implementing this by fork()ing out a
> separate process, doing plain set[ug]id() before stat() etc. there,
> and reporting the result back to the mother process.


Since the result is just yes/no, it could be passed in the return code,
which makes things nice and easy. No need for complicated mechanisms to
pass data between processes. That only just occurred to me - I was
thinking it would be like other complicated cases where pipes are used.

So in fact, it would just be a few lines of code - fork, set[ug]id,
stat, exit, wait, test returncode. Don't know why I didn't think of
doing it that way, now that it seems so easy...

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book