Re: stupid question on LDAP support

From: Mike Markley <mike_at_markley.org>
Date: Thu, 18 Feb 2010 14:24:33 -0800

It doesn't look like $d is actually getting substituted correctly in
dkimf_db_mkldapquery(). I set up an environment for LDAP testing (don't mind
the cringeworthy top-level suffix; it's old):

$ ldapsearch -x -h localhost -b 'ou=dkim,dc=loopted,dc=com,o=internet' -s sub '(&(objectClass=dkimSelector)(dkimDomain=loopted.com))'
# extended LDIF
#
# LDAPv3
# base <ou=dkim,dc=loopted,dc=com,o=internet> with scope subtree
# filter: (&(objectClass=dkimSelector)(dkimDomain=loopted.com))
# requesting: ALL
#

# loopted.com, dkim, loopted, com, internet
dn: dkimDomain=loopted.com,ou=dkim,dc=loopted,dc=com,o=internet
objectClass: top
objectClass: dkimSelector
dkimDomain: loopted.com
dkimPrivateKey: MIICXgIBAAKBgQDYzxBeKD+FgzvApipGDFDy7d1PgM84CPafF70vC9Sf3aGY9i
 [...]

But opendkim -Q keeps not matching it. I threw in a quick printf("%s\n",
ldap->ldap_descr->lud_filter) right before ldap_search_ext(), and:
> ldap://localhost/ou=dkim,dc=loopted,dc=com,o=internet?dkimPrivateKey?sub?(&(objectClass=dkimDomain)(dkimDomain=$d))
lt-opendkim: enter `query/n' where `n' is number of fields to request
> loopted.com/1
(&(objectClass=dkimDomain)(dkimDomain=$d))
lt-opendkim: dkimf_db_get(): record not found

I'll keep poking at it, but someone whose C is less rusty may very well
be able to spot a silly typo somewhere while I'm still trying to figure
it out.

-- 
Mike Markley <mike_at_markley.org>
Received on Thu Feb 18 2010 - 22:28:37 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:32:52 PST