9 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] per-user uid & ldap
FromSent OnAttachments
Adam DivakApr 9, 2007 2:58 pm 
Petri RiihikallioApr 10, 2007 3:12 am 
Adam DivakApr 10, 2007 7:21 am 
Petri RiihikallioApr 10, 2007 9:43 am 
Divák ÁdámMay 5, 2007 4:35 am 
Petri RiihikallioMay 5, 2007 10:29 am 
Divák ÁdámMay 5, 2007 11:44 am 
Petri RiihikallioMay 7, 2007 9:14 am 
Divák ÁdámMay 7, 2007 3:40 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] per-user uid & ldapActions...
From:Petri Riihikallio (petr@metis.fi)
Date:May 7, 2007 9:14:00 am
List:net.sourceforge.lists.courier-maildrop

If the path returned for HOMEDIR doesn't exist even root or mail won't be able to change to it, never mind the permissions.

Of course the correct HOMEDIR value was returned from the LDAP server, so that was not a problem. When testing with IMAP it gave the same error: "chdir([path]) failed!!"

Without any more evidence I suggest the following:

Grep the sources for the error message. You might even want to change it slightly (add dash, dot or something), recompile and verify that you found the right spot in the source. Then scroll backwards in the source code and see what was tested. Most probably there is a quite clear "if(some system call(supplied path))" a few lines before the error message. Then you need to figure out why it is returning something that causes the error message. You may want to add a log line that prints the supllied homedir and the effective uid to the logs to verify that they indeed are what you expect.

This is the way I have debugged some mysterious error messages in open source code. Usually I have found out that my own stupidity outsmarts me by large. I am not a C-genius, there are ample examples of logging in the code. Just cut, paste and edit a bit. Be careful with the parenthesis and semicolons, they can cause even more mysterious output from the compiler.

You might even try to create your own "Hello world" type of program that calls the same system call with a fixed string and prints the output. The only challenge is to find which header files and libraries to include, but man pages are your friend.