summaryrefslogtreecommitdiffstats
path: root/server/sbus/sssd_dbus.h
Commit message (Collapse)AuthorAgeFilesLines
* Simplify interfaces initializationSimo Sorce2009-08-101-12/+16
| | | | | | | Make as much as possible static, and remove use of talloc_reference and allocation/deallocation of memory when not necessary. Fix also responder use of rctx->conn, was mistakenly used for both monitor and dp connections.
* merge server and connection structuresSimo Sorce2009-08-101-5/+6
| | | | | | This reduce code duplication as it allows to use one set of watch and timeout functions, and at the same time also allow not to use a secondary structure just to unify these functions.
* Cosmetic changesSimo Sorce2009-08-101-15/+15
| | | | | Rationalize and rename connection names in preparatoin for merging of server and connection structures.
* Remove redundant memory contextsSimo Sorce2009-08-101-2/+1
| | | | Simplify code by removing stuff that is never used or redundant.
* Add reconnection logic to the SBUSStephen Gallagher2009-03-201-0/+17
| | | | | | | | Any client of the SBUS that wants to implement automatic reconnection may now call sbus_reconnect_init to set it up. The clients will need to set up a callback to handle the result of the reconnection and (in the case of a successful reconnection) readd the method handlers to the connection context.
* Implement SetUserAttributes in the InfoPipeStephen Gallagher2009-03-041-0/+1
| | | | | | | | | SetUserAttributes is now available for use in the Infopipe. I also reorganized a few of the internal InfoPipe objects to reduce code duplication. One very simple test is included in this checkin to validate that the parser is working.
* Implement GetUserAttributes in the InfoPipeStephen Gallagher2009-03-021-0/+2
| | | | | | | | | | | | | | | | | | This patch adds support for requesting user data in the sysdb via the InfoPipe. It currently has support for reading defined entries of integral, floating-point or string types. Tasks remaining: 1) Implement call to the provider when cache is out of date 2) Support byte arrays for userpic and similar I modified sysdb_search_ctx in sysdb_search.c to accept an array of attributes to pass into the LDB search. I also made one additional related fix: the btreemap now sorts in the correct order. Previously I had accidentally transposed the two values for sorting, so the map would always have been in exact reverse order.
* Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce2009-02-261-3/+3
| | | | | | dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
* Proper fix for memory handling problem.Simo Sorce2009-02-241-7/+4
| | | | | | | | | | sbus_message_handler is not responsible anymore for sending back data in any case. Transfer this responsibility to the handler function called. This way both synchronous and asynchronous funstions use the interface the same way and can properly free memory referenced by the reply after the send buffer has been filled in and all copies are done in sbus_conn_send_reply()
* Revert "Fixing serious memory allocation bug in sbus_message_handler."Simo Sorce2009-02-241-7/+1
| | | | | | | | | | | | | | | This reverts commit 13421cbe0af4343f9d110600755ffa756690b282. Conflicts: server/infopipe/infopipe.c server/infopipe/infopipe.h While this solution fixed the contingent memory problem it introduced other problems in handling asynchronous replies. Reverting in preparation for a different way to solve it. Conflicts have been taken care of.
* Add D-BUS introspection to InfoPipe This function is necessary to play nice ↵Stephen Gallagher2009-02-241-0/+1
| | | | with D-BUS clients built in multiple languages. It will read in the XML file on the first request and store the returned XML as a component of the sbus_message_handler_ctx for the connection. All subsequent requests during the process' lifetime will be returned from the stored memory. This is perfectly safe, as the available methods cannot change during the process lifetime.
* Fixing serious memory allocation bug in sbus_message_handler.Stephen Gallagher2009-02-231-1/+7
| | | | | | | | | | | | dbus_message_append_args() adds a reference to memory that is not copied to the outgoing message until dbus_connection_send() is called. Since we compile our reply messages in functions and then return the reply, we need a mechanism for deleting allocated memory after invoking dbus_connection_send. I have changed the arguments to sbus_msg_handler_fn so that it takes a talloc ctx containing the sbus_message_handler_ctx and a pointer to a reply object. We can now allocate memory as a child of the reply context and free it after calling dbus_connection_send.
* Attach the InfoPipe to the D-BUS system bus. InfoPipe is now capable of ↵Stephen Gallagher2009-02-231-0/+31
| | | | | | | | | | | listening for requests to org.freeipa.sssd.infopipe I made the sbus_add_connection function public so that I could use it for system bus connections. Adding initial framework for the InfoPipe Updating sysdb tests for the refactored sysdb methods.
* Add code to make it easier to reconnect in case the serverSimo Sorce2009-01-141-0/+1
| | | | | is not available immediately or drops the dbus connection. First step is the nss connection to the data provider.
* Modified sbus_server_new() to take a talloc memory context to useStephen Gallagher2008-12-151-1/+2
| | | | as a parent for the new server context object.
* Disconnected client SBUS connections would delete the master set of ↵Stephen Gallagher2008-12-151-1/+2
| | | | | | | | sbus_method_ctx entries, meaning that the next connection to attempt to disconnect would receive a segmentation fault also trying to delete them. They are now talloc_reference()-ed to their connection context and talloc_unlink()-ed upon deletion. I have also modified the sbus_new_server() call to take a reference to an sbus_srv_ctx object as a return argument, so that the calling function can keep track of the SBUS server context if it so chooses.
* Created a helper function sssd_service_sbus_init() to simplify creating the ↵Stephen Gallagher2008-11-201-0/+2
| | | | initial connection to the monitor service within the child services. It will create the D-BUS connection to the monitor and configure the service to handle the mandatory getIdentity and ping methods.
* Add method to get a connection's private dataSimo Sorce2008-11-191-0/+1
| | | | | | | Fix memory hierarchy, set the destructor on the server context so that it is called before any memory attached to it is freed. Before this change a talloc_free() on the event context would end in a double free and and an abort() inside talloc.
* The default message handler will now pass both the method_ctx and theStephen Gallagher2008-11-171-7/+11
| | | | | | | sbus_conn_ctx to all message handling functions. This will allow connection-specific data to be passed in by taking advantage of the sbus_conn_set_private_data() function on the sbus_conn_ctx struct. Presently this private data is global to all methods of the connection context.
* Add the ping funtion to the nss service Make the monitor task ping ↵Simo Sorce2008-11-041-17/+21
| | | | connecting services Make it possible to configure timeouts and service ping times.
* Renaming sssd/server/dbus to sssd/server/sbus. Making necessary changes to ↵Stephen Gallagher2008-11-031-0/+86
header includes and makefiles.