[Date Prev][Date Next] [Chronological] [Thread] [Top]

Perl-Backend Proxy Problem



Hi all,

i'm trying to establish a kind of proxy with the perl-backend (It is planned that the proxy will add some extra functionality in the future, but for now it should simply forward queries). The proxy is supposed to work like this:

1.) The (perl-backend) proxy gets a LDAP-query (ldapsearch from the shell)
2.) The backend forwards the query to another LDAP-server
3.) The other LDAP-server responds to the backend
4.) The backend forwards the response to ldapsearch



So far steps 1 to 3 are running fine. That means that the perl-backend knows the resulting data from the other LDAP-server. The problem i have is that i cannot seem to take the last step, which means that the data is lost and ldapsearch print just an "empty" LDIF result.


In the Sample.pm and manpage (man 5 slapd-perl) it is written (at subroutine search) that results are returned in the format ( resultnumber, LDIF-entry, LDIF-entry, ... ). I'm not sure what LDIF-entry exactly means:

Suppose i search for the cn's of some people and the perl-backend knows the results. In what format do i have to return this data? I tried the format to be in LDIF-format, which means

version: 1
dn:cn=MrX,ou=People,ou=someCompany
cn: Mister X

This doesn't work (even if i remove the first line "version: 1"). So what format so i need? A simple string? An array? Hash? Object?


If someone could help me this would be great! If you need further details of my problem just say so, i will try to explain further.



Bela

--
"Der Blitzableiter auf einem Kirchturm ist das denkbar stärkste Misstrauensvotum gegen den lieben Gott."
-- Karl Kraus