I am facing problem sending Assertion Control with LDAP DelRequest message.

 

  I am getting this error:

591950a9 begin get_filter

591950a9 conn=1004 op=1 DISCONNECT tag=120 err=2 text=error decoding filter

591950a9 conn=1004 op=1 DISCONNECT tag=120 err=2 text=error decoding filter

591950a9 conn=1004 op=1 do_delete: get_ctrls failed

 

  My code snippet looks like below:

            std::string keyy = "(&(cn=Manager)(givenName=Sudhi))";

            struct berval * berEncodedFilter = ber_bvstr(keyy.c_str());

 

            LDAPControl* serverControl[2];

            return_code = ldap_control_create(LDAP_CONTROL_ASSERT, 0, berEncodedFilter, 0, &(serverControl[0]));

            serverControl[1] = NULL;

 

            return_code = ldap_delete_ext(m_connection, dn.c_str(), serverControl, 0, &msgID);

 

            ber_bvfree(berEncodedFilter);

            ldap_control_free(serverControl[0]);

 

  Is there an issue in this code?

  Please help.

 

Thanks

Sudhi

Forum: 
Tags: 
Jeremy Davis's picture

Sorry for slow response. TBH, I have no idea about LDAP (other than I don't like it very much...! :).

So TBH, I have no idea about whether your code is good or not... Our OpenLDAP appliance is primarily maintained by a community volunteer and he uses it heavily, so my guess is that there is something wrong with your code, but I can't be sure and certainly can't give you any pointers sorry.

Perhaps it's worth asking OpenLDAP themselves? It looks like they have a mailing list precisely for this kind of question! :)

Sorry I couldn't help more and good luck with it.

Add new comment