--Apple-Mail-17-824115749 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
Hi,
Le 21 f=E9vr. 07 =E0 23:02, Pierangelo Masarati a =E9crit :
kiwi@oav.net wrote:
Full_Name: Xavier Beaudouin Version: 2.3.33 OS: FreeBSD 6.2 URL: http://www.oav.net/tmp/openldap/ Submission from: (NULL) (82.225.248.92)
Sending -> dn : uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet objectClass : top objectClass : kazarPerson uid : kiwi@oav.net cn : Nom Prenom description : Sample description uidNumber : 10 gidNumber : 10 userPassword : Password homeDirectory : /home/test mailQuota : 50 CouriermailQuota : 50S
str2entry: entry -1 has no dn str2entry(dn) failed send_ldap_result: err=3D0 matched=3D"" text=3D"" connection_get(8)
If the above is the way your LDIF is formatted, then back-perl (actually, str2entry, a helper function in the core of slapd) is =20 working as intended. There's supposed to be no space between attribute =20 names or "dn" and the colon ":". Please fix you PERL and report.
I did several tests :
- No space between attribute and data :
conn=3D0 op=3D1 SRCH base=3D"ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet" scope=3D2= deref=3D0 =20 filter=3D"(uid=3Dkiwi@oav.net)" We get a request for UID Looking for : (uid=3Dkiwi@oav.net) We get some results... Sending -> dn:uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet objectClass:top objectClass:kazarPerson uid:kiwi@oav.net cn:Nom Prenom description:Sample description uidNumber:10 gidNumber:10 userPassword:Password homeDirectory:/home/test mailQuota:50 CouriermailQuota:50S
=3D> ldap_bv2dn(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet,0) <=3D ldap_bv2dn(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
=3D> ldap_dn2bv(272) <=3D ldap_dn2bv(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
=3D> ldap_dn2bv(272) <=3D ldap_dn2bv(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
ldif_parse_line: missing ':' after <=3D str2entry: slap_str2undef_ad(): empty AttributeDescription str2entry(dn) failed send_ldap_result: err=3D0 matched=3D"" text=3D"" conn=3D0 op=3D1 SEARCH RESULT tag=3D101 err=3D0 nentries=3D0 text=3D daemon: activity on 1 descriptor daemon: activity on: 8r daemon: read activity on 8 connection_get(8) ber_dump: buf=3D0x08253a00 ptr=3D0x08253a00 end=3D0x08253a05 len=3D5 0000: 02 01 03 42 00 ...B. connection_read(8): input error=3D-2 id=3D0, closing. daemon: select: listen=3D6 active_threads=3D0 tvp=3DNULL daemon: select: listen=3D7 active_threads=3D0 tvp=3DNULL daemon: activity on 1 descriptor daemon: waked daemon: select: listen=3D6 active_threads=3D0 tvp=3DNULL daemon: select: listen=3D7 active_threads=3D0 tvp=3DNULL conn=3D0 op=3D2 UNBIND daemon: removing 8 conn=3D0 fd=3D8 closed
- No space between attribute 'dn' and ':' :
conn=3D0 op=3D1 SRCH base=3D"ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet" scope=3D2= deref=3D0 =20 filter=3D"(uid=3Dkiwi@oav.net)" We get a request for UID Looking for : (uid=3Dkiwi@oav.net) We get some results... Sending -> dn: uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet objectClass : top objectClass : kazarPerson uid : kiwi@oav.net cn : Nom Prenom description : Sample description uidNumber : 10 gidNumber : 10 userPassword : Password homeDirectory : /home/test mailQuota : 50 CouriermailQuota : 50S
=3D> ldap_bv2dn(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet,0) <=3D ldap_bv2dn(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
=3D> ldap_dn2bv(272) <=3D ldap_dn2bv(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
=3D> ldap_dn2bv(272) <=3D ldap_dn2bv(uid=3Dkiwi@oav.net,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet)=3D0=
ldif_parse_line: missing ':' after <=3D str2entry: slap_str2undef_ad(objectClass): AttributeDescription =20 contains inappropriate characters str2entry(dn) failed send_ldap_result: err=3D0 matched=3D"" text=3D"" conn=3D0 op=3D1 SEARCH RESULT tag=3D101 err=3D0 nentries=3D0 text=3D daemon: activity on 1 descriptor daemon: activity on: 8r daemon: read activity on 8 connection_get(8) ber_dump: buf=3D0x08253830 ptr=3D0x08253830 end=3D0x08253835 len=3D5 0000: 02 01 03 42 00 ...B. connection_read(8): input error=3D-2 id=3D0, closing. daemon: select: listen=3D6 active_threads=3D0 tvp=3DNULL daemon: select: listen=3D7 active_threads=3D0 tvp=3DNULL daemon: activity on 1 descriptor daemon: waked daemon: select: listen=3D6 active_threads=3D0 tvp=3DNULL daemon: select: listen=3D7 active_threads=3D0 tvp=3DNULL conn=3D0 op=3D2 UNBIND daemon: removing 8 conn=3D0 fd=3D8 closed
Still getting no results.
But there is an interressing error : "ldif_parse_line: missing ':' =20 after"
So it seems that "old way" I used in OpenLDAP 2.2.xx branch doesn't =20 seems to be bad.
What are the changes in str2entry() that may change ?
Here is the kind of string I sent to :
my $entry =3D "dn : uid=3D$mailaddr,ou=3Dmailboxes,dc=3Dkazar,dc=3Dnet= n\t". "objectClass : top\n\t". "objectClass : kazarPerson\n\t";
$entry .=3D "uid : $mailaddr\n\t"; $entry .=3D "cn : Nom Prenom\n\t"; $entry .=3D "description : Sample description\n\t"; $entry .=3D "uidNumber : 10\n\t"; $entry .=3D "gidNumber : 10\n\t"; $entry .=3D "userPassword : Password\n\t"; $entry .=3D "homeDirectory : /home/test\n\t"; $entry .=3D "mailQuota : 50\n\t"; $entry .=3D "CouriermailQuota : 50S\n\t";
print STDERR "Sending -> $entry\n";
push @match_entries, $entry;
return(0, @match_entries);
Note that this "simpified" back-perl backend what working very well =20 on OpenLDAP 2.2.xx branch... And the documentation doesn't seems to =20 show some big changes in this part...
THanks, /Xavier=
--Apple-Mail-17-824115749 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIILJjCCAz8w ggKooAMCAQICAQ0wDQYJKoZIhvcNAQEFBQAwgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0 ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcx KDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0 ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxA dGhhd3RlLmNvbTAeFw0wMzA3MTcwMDAwMDBaFw0xMzA3MTYyMzU5NTlaMGIxCzAJBgNVBAYTAlpB MSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUg UGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA xKY8VXNV+065yplaHmjAdQRwnd/p/6Me7L3N9VvyGna9fww6YfK/Uc4B1OVQCjDXAmNaLIkVcI7d yfArhVqqP3FWy688Cwfn8R+RNiQqE88r1fOCdz0Dviv+uxg+B79AgAJk16emu59l0cUqVIUPSAR/ p7bRPGEEQB5kGXJgt/sCAwEAAaOBlDCBkTASBgNVHRMBAf8ECDAGAQH/AgEAMEMGA1UdHwQ8MDow OKA2oDSGMmh0dHA6Ly9jcmwudGhhd3RlLmNvbS9UaGF3dGVQZXJzb25hbEZyZWVtYWlsQ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