Re: [Dovecot] mail_chroot problems / dovecot 1.1rc4

2008-05-05 Thread Michal Soltys

Timo Sirainen wrote:

On Apr 4, 2008, at 4:02 PM, Michal Soltys wrote:


Could you try if this works: 
http://hg.dovecot.org/dovecot-1.1/rev/9edaf878bb96




Both global and per-user chroot settings work fine with that patch.

Thanks !




Re: [Dovecot] mail_chroot problems / dovecot 1.1rc4

2008-05-04 Thread Timo Sirainen

On Apr 4, 2008, at 4:02 PM, Michal Soltys wrote:


Timo Sirainen wrote:
Right. If you use mail_chroot or chroot, the home directory points  
under the chroot. I guess it might be also useful for it not to do  
that, but I can't change that without breaking backwards  
compatibility, and I'm not sure if it's worth it to add yet another  
setting just for that.


So in such case - is there any way to chroot mail processes for  
userdb that can't (or shouldn't) use /./ and can't modify HOME to  
fit mail_chroot setting ? Like system's passwd, or other where  
changing HOME would/could break other things ?


I know what you mean by breaking backwards compatibility in this  
context, but in this way, mail_chroot is practically unusable  
besides custom-userdb + dovecot-only setups. And in this scenario -  
you can simply use /./ (point being, in a way - is there anyone  
actually using mail_chroot / chroot along with stripped HOME paths ?).


Could you try if this works: http://hg.dovecot.org/dovecot-1.1/rev/9edaf878bb96



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] mail_chroot problems / dovecot 1.1rc4

2008-04-04 Thread Timo Sirainen

On Apr 3, 2008, at 11:33 AM, Michal Soltys wrote:

dovecot will try to chroot into /home/home/admin with the following  
message in logs, in my case:


Fatal: chdir(/home/home/admin) failed with uid 1999: No such file or
directory

The same happens if I use per-user chroot= option in userdb, f.e. in  
passwd-file


Right. If you use mail_chroot or chroot, the home directory points  
under the chroot. I guess it might be also useful for it not to do  
that, but I can't change that without breaking backwards  
compatibility, and I'm not sure if it's worth it to add yet another  
setting just for that.




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] mail_chroot problems / dovecot 1.1rc4

2008-04-04 Thread Michal Soltys

Timo Sirainen wrote:


Right. If you use mail_chroot or chroot, the home directory points under 
the chroot. I guess it might be also useful for it not to do that, but I 
can't change that without breaking backwards compatibility, and I'm not 
sure if it's worth it to add yet another setting just for that.




So in such case - is there any way to chroot mail processes for userdb 
that can't (or shouldn't) use /./ and can't modify HOME to fit 
mail_chroot setting ? Like system's passwd, or other where changing HOME 
would/could break other things ?


I know what you mean by breaking backwards compatibility in this 
context, but in this way, mail_chroot is practically unusable besides 
custom-userdb + dovecot-only setups. And in this scenario - you can 
simply use /./ (point being, in a way - is there anyone actually using 
mail_chroot / chroot along with stripped HOME paths ?).