Hi
i have a strange problem with LDAP module in Pike 7.8.316
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 */
"66duJjhG66mss"
})
])
the result on Pike 7.8.316 is:
Ldap /$/Protocols.pmod/LDAP.pmod/client()
i = Error Strings: Success
Search: /$/Protocols.pmod/LDAP.pmod/client()->result()
Error Strings: Success
count:1
Result: 0
Please help!
greetings Dominik Niehus
|