On 03/03/2011 01:28 PM, Michael Ströder wrote:
> HI!
>
> (Sigh!) I'm not a C programmer.
>
> Could somebody please look what's wrong with encode_assertion_control() in
> Modules/ldapcontrol.c? It seg faults.
     err = 
ldap_create_assertion_control_value(NULL,assertion_filterstr,&ctrl_val);
The NULL should be an LDAP* and it must be valid.

It needs the LDAP* handle because it calls ldap_alloc_ber_with_options() 
to allocate the BER for the control value.
> $ python -c "import ldap;print
> repr(ldap.encode_assertion_control('(objectClass=*)'))"
> Segmentation fault (core dumped)
>
> You have to set
>
> extra_compile_args = -g -DLIBLDAP_HAS_ASSERTION_CONTROL_FUNC
>
> in setup.cfg and have a fairly recent OpenLDAP 2.4 installation to get it
> compiled.
>
> Ciao, Michael.
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search&  Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Python-LDAP-dev mailing list
> Python-LDAP-dev@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/python-ldap-dev


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to