Re: [Exim] create_directory

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Paul Dermody
Cc: exim-users
Asunto: Re: [Exim] create_directory
On 8 Oct 2002, Paul Dermody wrote:

> is it possible to have create_directory create part of the path as one
> user ie mail, and other as the user?
>
> example
>
> /var/spool/mail/domain as mail
> /var/spool/mail/domain/user as user


No.

> have looked through the docs and do not see anything that sticks out,
> and am still searching the archives. will probably open up the source
> code here in a second and see if i can find a way in there if i have
> to.


You will find it very hard to find a way. The reason is that Exim
(version 4) changes uid to the user using setuid() before running the
transport. There is no way it can get back any privilege.

Wait a minute. I'm writing rubbish. There is a "setup" function for the
transport that is called as root. This is used for expanding quota
strings, so they can reference files that the user cannot. I suppose you
could add some option that was referenced in the setup function, and use
it to specify a directory to be created. If you really wanted to, you
could fork and do the job under a different uid.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.