perdition 1.18rc1 + ldap + email login

TheSin <thesin-BU7q61dqOYgzuMni1zkPJNi2O/[email protected]> Tue, 22 Sep 2009 15:12:17 -0600
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <[email protected]>
Hey guys I wanted to save some problems for others, I just spent 4  
days trying to figure this out.  I just sent this to the perdition  
list so I hope it gets fixed, just incase I thought I'd share, here is  
what I sent to their list.  Hope it helps.

---

I'm not sure if this affects all ldap users, but since 1.18rc1 I  
couldn't login anymore using [email protected] like used in ispman.

We used to use

http://server/?o=ispman?mailRoutingAddress?sub?(uid=%25s)

Since it's not using serverdb_get2 I updated that line to use

http://server/?o=ispman?mailRoutingAddress,mailHost?sub?(uid=%25s)

Which works 100% using ldap search  It returns

mailRoutingAddress = user_domain_tld@mailHost
mailHost = mailHost

so I had to also add to perdition.conf

strip_domain remote_login

Now that being said even with all that I'd get server null, looking  
into perditiondb_ldap.c I found that it wasn't setting the ref  
values.  I had to changes these lines

        /* Build the return string */
        if (returns[0])
                user_str = &returns[0];
        if (returns[1])
                server_str = &returns[1];
        if (returns[2])
                port_str = &returns[2];

to look like this

        /* Build the return string */
        if (returns[0])
                *user_str = returns[0];
        if (returns[1])
                *server_str = returns[1];
        if (returns[2])
                *port_str = returns[2];

Now everything works 100%, server gets set as does the user, hope this  
helps others cause it was 4 days of hell for me :D
---
TS
http://southofheaven.org/
Chaos is the beginning and end, try dealing with the rest.


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf