diff options
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r-- | source3/libads/ldap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 84ceba2406..c5c43c44c5 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -465,6 +465,18 @@ got_connection: return ads_sasl_bind(ads); } +/** + * Disconnect the LDAP server + * @param ads Pointer to an existing ADS_STRUCT + **/ +void ads_disconnect(ADS_STRUCT *ads) +{ + if (ads->ld) { + ldap_unbind(ads->ld); + ads->ld = NULL; + } +} + /* Duplicate a struct berval into talloc'ed memory */ |