summaryrefslogtreecommitdiff
path: root/src/responder/common/responder_dp.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-18responder_dp: Add timeout to side requetsSimo Sorce1-1/+25
This is an additional proteciont in case the provider misbheaves to avoid having requests pending forever. Fixes: https://fedorahosted.org/sssd/ticket/1717
2012-10-29Free the internal DP requestJakub Hrozek1-0/+8
2012-10-11do not call dp callbacks when responder is shutting downPavel Březina1-0/+8
https://fedorahosted.org/sssd/ticket/1514 We were experiencing crash duting responder shut down. This happened when there were some unresolved dp request during the shut down. The memory hierarchy is main_ctx->specific_ctx->rctx, where specific_ctx may be one of the pam, nss, sudo, etc. contexts. If we try to call dp request callback as a result of responder termination, the specific context is already semi freed, which may cause crash.
2012-05-03SSH: Add dp_get_host_send to common responder codeJakub Hrozek1-11/+1
Instead of using account_info request, creates a new ssh specific request. This improves code readability and will make the code more flexible in the future. https://fedorahosted.org/sssd/ticket/1176
2012-04-24Add domain name to get_account_info requestSumit Bose1-0/+1
2012-04-24Add conn_name to allow different names for domains and connectionsJan Zeleny1-1/+1
2012-03-08Use the correct hash table for pending requestsSimo Sorce1-5/+4
The function that handled pending requests on reconnect was checking an orphaned global variable that was never used, redenring the whole function uselsess. This fixes a very nasty bug that was causing requests for which we never received an answer for (for example because the backend failed and was restarted) to be never removed and therefore causing a black hole effect for any other request of the same type. Fixes: https://fedorahosted.org/sssd/ticket/1229
2012-02-10Fix group enumerationJakub Hrozek1-2/+7
Also adds some more debugging and fixes a code style issue. https://fedorahosted.org/sssd/ticket/1182
2012-02-07DP: Add support for hosts in sss_dp_get_accountJan Cholasta1-1/+11
Host requests are directed to the host info handler.
2012-01-27DP: Refactor responder_dp_req so it's reusable by other respondersJakub Hrozek1-232/+298
* the internal request is now more generic and is decoupled from account-specific data. There is a new sss_dp_issue_request() wrapper that issues a BE request or registers a callback * the public requests all use struct sss_dp_req_state as the tevent_req state data. This allows to report back data from the internal request even if the caller is just a callback notifier * each specific request now uses an _info structure that contains all the data necessary to construct a DBusMessage passed to provider * each specific request now defines a sss_dp_get_$data_msg callback that is called from the sss_dp_issue_request() common wraper. The purpose of the wrapper is to construct a DBusMessage and bind it to a DBus method so the message can be just sent over to back end The miscellanous changes include: * change SSS_DP_ constants to an enum. This way, a switch() would error if a value is not handled. * rename sss_dp_get_account_int_send() to sss_dp_internal_get_send() request because the internal request is going to handle more than just account data * the DBus return values were renamed from err_maj, err_min to dp_err and dp_ret respectively
2012-01-27DP: Add support for services in dp requestsStephen Gallagher1-0/+3
2012-01-23DP: Fix bugs in sss_dp_get_account_intStephen Gallagher1-66/+44
The conversion to the tevent_req style introduced numerous bugs related to memory management of the various client requests. In some circumstances, this could cause memory corruption and segmentation faults in the NSS responder. This patch makes the following changes: 1) Rename the internal lookup from subreq to sidereq, to indicate that it is not a sub-request of the current lookup (and therefore is not cancelled if the current request is). 2) Change the handling of the callback loops since they call tevent_req_[done|error], which results in them being freed (and therefore removed from the cb_list. This was the source of the memory corruption that would occasionally result in dereferencing an unreadable request. 3) Remove the unnecessary sss_dp_get_account_int_recv() function and change sss_dp_get_account_done() so that it only frees the sidereq. All of the waiting processes have already been signaled with the final results from sss_dp_get_account_int_done()
2012-01-21RESPONDER: Extend sss_dp_account_send() to include extra dataStephen Gallagher1-7/+24
Some NSS maps such as 'services' require more values to be passed to the data provider than just the name or ID. In these cases, we will amend an optional component to filter value to pass to the data provider backend.
2011-12-16DP: Remove processed callbacksJakub Hrozek1-3/+5
2011-11-29RESPONDER: Refactor DP requests into tevent_req styleStephen Gallagher1-360/+441
2011-10-14Fixed timeout handling in respondersJan Zeleny1-72/+72
2011-10-13Check if dp_requests hash table exists before using itJakub Hrozek1-0/+5
2011-08-15Do not delete requests inside hash_iterate loopJakub Hrozek1-10/+12
2010-12-02Add a special filter type to handle enumerationsSumit Bose1-1/+1
2010-10-26Fix double free issueSumit Bose1-2/+2
2010-10-26Remove all nss requests after a reconnectSumit Bose1-0/+19
Currently we do not handle the open nss request after a reconnect and wait until they timeout (which is a couple of minutes!). This patch adds a handler that terminates all requests after a reconnect. Then responder will return matching cache entries or nothing.
2010-10-13Add netgroup support to the NSS responderStephen Gallagher1-0/+3
2010-06-10Check the correct variable for NULL after creating timerStephen Gallagher1-1/+1
In several places, we were creating a new timer and assigning it to the tev variable, but then we were checking for NULL from the te variable (which, incidentally, is guaranteed never to be NULL in this situation) https://fedorahosted.org/sssd/ticket/523
2010-03-17Fix a series of memory leaks in the SBUSStephen Gallagher1-4/+1
2010-03-15Properly handle dbus send attempts on a closed connectionStephen Gallagher1-22/+10
dbus_connection_send_with_reply() will report success and return a NULL pending_reply when the connection is not open for communication. This patch creates a new wrapper around dbus_connection_send_with_reply() to properly detect this condition and report it as an error.
2010-03-04Add forgotten \n in DEBUG statementsMartin Nagy1-3/+3
Logs from confdb with missing '\n' in the DEBUG statements annoyed me so I decided to fix them. I also made a quick grep through the code and found other places so I fixed them too.
2010-02-18Rename server/ directory to src/Stephen Gallagher1-0/+590
Also update BUILD.txt