On Fri, Jul 11, 2003 at 05:54:35PM -0400, Sam Varshavchik wrote:
Mariano Absatz writes:
Hi,
I've just compiled maildrop 1.5.3 with ldap support and I'm having problems
'cause my LDAP base contains spaces.
I configure maildrop's ldap.conf to use
binddn 'cn=Admin,ou=Service,o=My Organization'
Remove the single quotes.
Sam,
As far as I can tell from the source of maildrop/mdldapconfig.c, you are
using sscanf to grab a var/val pair from the config file using the line:
sscanf(buf,"%s %s",var,val);
As near as I can tell from the sscanf manpage (on the Solaris 8 box I am
using) the %s conversion specification stops reading at the first
whitespace character. Would it possible (or advisable) to use something
like %[:print:] instead of the second %s?
In all honesty, I am not a C programmer so I have no idea if that would
even work or even if that's the real problem. It may be necessary to
construct something like %[A-Za-z0-9.,= ] instead (including any other
characters needed). Unless, of course, there is a better function for
splitting the config line up.