]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
v4: Protect LDAP connections from being freed when there are outstanding queries...
authorNick Porter <nick@portercomputing.co.uk>
Wed, 13 Oct 2021 19:24:41 +0000 (20:24 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 19:24:41 +0000 (14:24 -0500)
commitc895a0e28fbfda7cda5aa955d717cb95326fcb00
tree7a151beec4705952eb761db20686702ed27bd262
parent1873936ecb9cf3ef0ec37e6fd78efb6d600e2903
v4: Protect LDAP connections from being freed when there are outstanding queries... (#4267)

* Use correct DN string in debug message

* Use query type to identify LDAP searches

* Protect fr_ldap_connection_t from being freed if there are pending queries

* Add watcher checking for outstanding queries when an LDAP connection closes

* Alter _ldap_query_free() to free the associated connection if it is closed ...

... and has no other queries associated with it

* Queries are removed from the pending tree by the query destructor

* Improve handling of un-expected results retrieved from libldap

* Don't free LDAP results just because an LDAP error was returned ...

... if the caller wants the results, it may want to query them
regardless of success or failure.

* Add debug message for auth bind reject

* Free the bind_auth_ctx when we've finished with it

* Improved version of _ldap_bind_auth_io_read()

- handle fr_ldap_result() returning no result
- handle LDAP_PROC_REJECT
- use a normal while loop
src/lib/ldap/base.c
src/lib/ldap/bind.c
src/lib/ldap/connection.c
src/modules/rlm_ldap/rlm_ldap.c