LDAP_DELETE(3)
π
LDAP_DELETE(3) β the ldap_delete girlies' guide
okay so bestie, this is the <ldap_delete.h>... no wait, it's LDAP_DELETE(3), a Library Functions Manual page, and it's literally all about Perform an LDAP delete operation β¨ four whole functions that yeet an entry out of your directory. yes ma'am. let's get into it π
π LIBRARY
OpenLDAP LDAP (libldap, -lldap) β that's the vibe check on where these bad boys live π«Ά
β¨ SYNOPSIS β¨
#include <ldap.h>
int ldap_delete_s(ld, dn)
LDAP *ld;
char *dn;
int ldap_delete(ld, dn)
LDAP *ld;
char *dn;
int ldap_delete_ext(ld, dn, serverctrls, clientctrls, msgidp)
LDAP *ld;
char *dn;
LDAPControl **serverctrls, **clientctrls;
int *msgidp;
int ldap_delete_ext_s(ld, dn, serverctrls, clientctrls)
LDAP *ld;
char *dn;
LDAPControl **serverctrls, **clientctrls;
no cap, that's four whole signatures. K&R style. vintage. we respect it π
πΈ DESCRIPTION πΈ
π ldap_delete_s() β the patient one
The ldap_delete_s() routine is used to perform an LDAP delete operation synchronously. it takes dn, the DN of the entry to be deleted (yes, that's the one you're sending to the shadow realm π¦). it returns an LDAP error code, indicating the success or failure of the operation. simple. iconic. it waits for you like a good bestie.
π ldap_delete() β the main character
The ldap_delete() routine is used to perform an LDAP delete operation asynchronously. she takes the same parameters as ldap_delete_s(), but returns the message id of the request she initiated π₯ and the result of the delete can be obtained by a subsequent call to ldap_result(3). so you gotta follow up. she's not gonna text you first, bestie.
π¦ ldap_delete_ext() β the fancy one with accessories
The ldap_delete_ext() routine allows server and client controls to be specified to extend the delete request. yes, controls. the little extras. the it's giving customization β¨ this routine is asynchronous like ldap_delete(), but its return value is an LDAP error code. it stores the message id of the request in the integer pointed to by msgidp. so you get the error code and the id. two for one. we love to see it.
π ldap_delete_ext_s() β the fancy one but chill
The ldap_delete_ext_s() routine is the synchronous version of ldap_delete_ext(). it also returns an LDAP error code indicating success or failure of the operation. controls + waiting = her whole personality π
π ERRORS π
ldap_delete_s()returns an LDAP error code which can be interpreted by calling one ofldap_perror(3)and friends π―ββοΈldap_delete()returns-1if something went wrong initiating the request. it returns the non-negative message id of the request if things went ok.ldap_delete_ext()andldap_delete_ext_s()return some Non-zero value if something went wrong initiating the request, else return0.
β οΈ okay so read those return values carefully bestie βldap_delete()returning-1is the "oops" signal, but a non-negative return is your message id, not a status. don't be out here treating everything as success/fail π and for the_extpair, non-zero means the initiating went wrong,0means it went fine. that's it. that's the whole assignment.
π«Ά SEE ALSO π«Ά
go read those next, iykyk π
π ACKNOWLEDGEMENTS π
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release.
and that's the tea, bestie πβ¨ this whole page is brought to you by OpenLDAP 2.6.16, dated 2026/10/21 β LDAP_DELETE(3), logged off, deleted, periodt π
π
π¦ where this page comes from
- fedora 44: openldap-devel 2.6.16-1.fc44 Β· OLDAP-2.8
- fedora 44: openldap-devel 2.6.16-1.fc44 Β· OLDAP-2.8
- Copyright 1998-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms