[python-ldap] connect via a socket object

Michael Ströder michael at stroeder.com
Sun May 29 17:57:29 CEST 2011

Salman Aljammaz wrote:
> Is it possible to get a LDAPObject by passing it a python socket or
> file-like object instead of a uri sting?

Not yet. One could wrap OpenLDAP's function ldap_init_fd() for that purpose. 
Feel free to submit a patch. But not sure whether ldap_init_fd() is already 
present in the OpenLDAP libs you're using.

> I've got a ldap server behind a vpn, and I would like to use a
> tunneled connection to get to it.

Maybe I don't get the point. Normally VPNs are invisible to LDAP connections 
since they route IP packets. What's so special with your VPN?

Ciao, Michael.

More information about the python-ldap mailing list