thanks very much!

Is it a bug of qmail-ldap-control or other?

If ldapcontroldn is different from ldapbasedn in ldap, I found it
getting controls as following:

First, qmail-ldap-control get ldapbasedn from ldap according
ldapcontroldn(from file system);
Then it use ldapbasedn(from ldap) as the basedn to get other controls
from ldap.
But, it must use ldapcontroldn as the basedn not ldapbasedn to get
controls, otherwise, no control can be obtained from ldap.

In my case, the ldapcontroldn is "ou=mailConfigs,dc=test,dc=com", the
ldapbasedn for current server is "ou=test.com,ou=accounts,dc=test,dc=com".

If I change both to "dc=test,dc=com", it works fine! The previous
version 20030306 of qmail-ldap-control is working perfectly with my
configuration above.


On 30 Apr 2004 07:14:33 +0200
Turbo Fredriksson <[EMAIL PROTECTED]> wrote:

> Quoting "Austin.Just" <[EMAIL PROTECTED]>:
> 
> > I am using qmail-ldap-1.03-20040301a-controls20040422.patch.bz2 from 
> > http://qmail.bayour.com/patches_ldap/.
> > 
> > qmail-ldaplookup failed to search ldap.
> 
> Works fine for me on two PRODUCTION machines...
> 
> Are you using the matching QmailLDAP patch (in this case, the
> patch from 20040301a)? The QmailLDAP/Controls patch is version
> dependent on the QmailLDAP patch...
> 
> > Here is the failed log with fllowing command:
> > # /var/qmail/bin/qmail-ldaplookup -u [EMAIL PROTECTED] -d 255
> > ============== cut =============
> > control_readline: Will search FS for: control/me
> > control_readline: Will search FS for: control/ldappassword
> > control_readline: Will search FS for: control/ldaplogin
> > init_ldap: control/ldaplogin: 
> > init_ldap: control/ldappassword: 
> 
> Hmmm. Empty login/password. That's not been tested. I can't
> see anything in the code that makes it break, but...
> 
> > control_readline: Will search FS for: control/ldapcontroldn
> > init_ldap: control/ldapcontroldn: ou=mailConfigs,dc=yodoo,dc=com
> 
> > qldap_ctrl_bind: Allocating memory for LDAP connection...
> > qldap_ctrl_bind: Allocating memory for LDAP connection... SUCCESS
> > qldap_ctrl_bind: Opening LDAP connection to 127.0.0.1 
> > qldap_open: init successful
> > qldap_set_option: set referrals successful
> >   Connection SUCCESS
> > qldap_ctrl_bind: Binding to LDAP server as :
> >   qldap_bind: successful
> >   SUCCESS
> 
> Oki, works without login/password it seems...
> 
> > control_readline: Will search LDAP for: control/ldapbasedn
> > control_ldap_search: Looking for control/ldapbasedn (0, 0)
> > control_ldap_search: me = mail.test.com
> > control_ldap_search: attribute = ldapbasedn
> > qldap_filter: search for (&(cn=mail.test.com)(objectclass=qmailControl)) failed 
> > (No such object)
> > control_ldap_search: value(ldapbasedn)='(null pointer)'
> > init_ldap: control/ldapbasedn: 
> 
> So... It can't find the ldapBaseDN (nor any other that's really
> in there) attribute.
> 
> > And use ldapsearch to get qmail controls in ldap
> > # ldapsearch -x -b "ou=mailConfigs,dc=yodoo,dc=com" 
> > "(&(cn=mail.test.com)(objectclass=qmailControl))"
> 
> Everything look ok from here. You'll have to start slapd
> with high debuging and look at it's output....
> -- 
> South Africa $400 million in gold bullion nuclear iodine Iran
> supercomputer smuggle Noriega kibo cryptographic AK-47 cracking SEAL
> Team 6 munitions genetic
> [See http://www.aclu.org/echelonwatch/index.html for more about this]

--
Austin.Just <[EMAIL PROTECTED]>
http://yodoo.com

Reply via email to