A number of new responders is currently being developed in addition to
the existing NSS and PAM responders that only deal with accounts. The
new responders often deal with different data such as automounter maps
or sudoer rules. It is prudent to let these responders communicate with
back ends using their own protocol.
Attached is a patch that refactors the requests in Data Provider so that
they are more generic. The commits message is slightly more verbose than
usual this time to explain all the changes.
I'm going to include a sudo request shortly as an example of a new
non-account request.
[PATCH] DP: Refactor responder_dp_req so it's reusable by other responders:
* the internal requst 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 patch must be applied on top of all Stephen's patches that are
currently on the list, including the services support.