pike-devel-owner handles mailing list stuff. Forwarding to the actual
developer list.
--
Peter Bortas
---------- Forwarded message ----------
From: Dominik Niehus
nicke@uni-paderborn.de
Date: Wed, Aug 12, 2009 at 11:16 PM
Subject: Protocol.LDAP not working in 7.8?
To: pike-devel-owner@lists.lysator.liu.se
Hi
i have a strange problem with LDAP module in Pike 7.8.316/7.8.337
my simple test program ldap_test.pike :
void main () {
object ldap = Protocols.LDAP.client("ldap://127.0.0.1");
write("Ldap %O\n", ldap);
ldap->bind("cn=admin,dc=test,dc=de","save",3);
write("i =" + " " + "Error Strings: " + ldap ->error_string() + "\n");
ldap->set_basedn("ou=org,dc=test,dc=de");
ldap->set_scope(2);
object test = ldap->search("(&(uid=test01)(objectclass=person))");
write("Search: %O\n", test);
write("Error Strings: " + ldap ->error_string() + "\n");
write("count:" + test->count_entries() + "\n");
write("Result: %O\n", test->fetch(1));
}
the result on Pike 7.6.86
Ldap Protocols.LDAP.client("socket", "127.0.0.1:389", 777 /* fd=9 */)
i = Error Strings: Success
Search: Protocols.LDAP.client("socket", "127.0.0.1:389", 777 /* fd=9
*/)->result()
Error Strings: Success
count:1
Result: ([ /* 8 elements */
"cn": ({ /* 1 element */
"e w01"
}),
"dn": ({ /* 1 element */
"uid=test01,ou=student,ou=user,ou=upb,ou=asb,ou=org,dc=test,dc=de"
}),
"givenName": ({ /* 1 element */
"e"
}),
"objectClass": ({ /* 3 elements */
"person",
"organizationalPerson",
"inetOrgPerson"
}),
"sn": ({ /* 1 element */
"w01"
}),
"uid": ({ /* 1 element */
"test01"
}),
"userPassword": ({ /* 1 element */
"{crypt}66duJjhG66mss"
})
])
the result on Pike 7.8.316 is:
Ldap /${PIKE_MODULE_PATH}/Protocols.pmod/LDAP.pmod/client()
i = Error Strings: Success
Search: /${PIKE_MODULE_PATH}/Protocols.pmod/LDAP.pmod/client()->result()
Error Strings: Success
count:1
Result: 0
the result on Pike 7.8.337
Ldap Protocols.LDAP.client()
i = Error Strings: Success
Suche: Protocols.LDAP.client()->result()
Error Strings: Success
count:1
Result: 0
Please help!
greetings Dominik Niehus