summaryrefslogtreecommitdiff
path: root/server/sbus
AgeCommit message (Collapse)AuthorFilesLines
2009-02-24Add D-BUS introspection to InfoPipe This function is necessary to play nice ↵Stephen Gallagher1-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.
2009-02-23Fixing serious memory allocation bug in sbus_message_handler.Stephen Gallagher2-11/+29
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.
2009-02-23Attach the InfoPipe to the D-BUS system bus. InfoPipe is now capable of ↵Stephen Gallagher3-10/+55
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.
2009-02-16Modifying sbus_message_handler to return DBUS_ERROR_UNKNOWN_METHOD when the ↵Stephen Gallagher1-2/+10
requested method is not registered with the message handler. Previously, we returned DBUS_HANDLER_RESULT_HANDLED with no indication that nothing had happened.
2009-01-27Refactoring the monitor code and SBUS utility functions.Stephen Gallagher2-0/+121
2009-01-14Add code to make it easier to reconnect in case the serverSimo Sorce2-0/+7
is not available immediately or drops the dbus connection. First step is the nss connection to the data provider.
2009-01-09Lots of little nasty bugs fixed.Simo Sorce1-4/+4
I was finally able to get a getpwnam() request go through sssd, hit the remote ldap server and get the answer back with 'getent passwd foo' Yupiee!
2009-01-06SBUS messages with no reply (or no immediate reply) would incorrectly report ↵Stephen Gallagher1-3/+2
DBUS_HANDLER_NOT_YET_HANDLED. This would cause SBUS to report NOT_IMPLEMENTED to the calling function. The message_handler will now check the return code of the method call to determine which reply to send, instead of relying on the presence of a reply message.
2008-12-22libevents renamed upstream to libteventSimo Sorce3-3/+3
events.h -> tevent.h
2008-12-15Modified sbus_server_new() to take a talloc memory context to useStephen Gallagher2-3/+5
as a parent for the new server context object.
2008-12-15Adding a parameter to the sbus_service_sbus_init function to allow passing ↵Stephen Gallagher1-1/+5
in an sbus_conn_destructor_fn to the sbus_new_connection() function. Fixing minor warning about the usage of talloc_reference.
2008-12-15Disconnected client SBUS connections would delete the master set of ↵Stephen Gallagher3-4/+9
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.
2008-12-10Fix indentation to follow rulesSimo Sorce1-21/+29
2008-12-09Fix dbus related memory leaksSimo Sorce1-2/+4
2008-11-24REmove test client. It's not needed anymore.Simo Sorce1-214/+0
2008-11-20Created a helper function sssd_service_sbus_init() to simplify creating the ↵Stephen Gallagher1-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.
2008-11-20Start conversion from a fork() and live to a fork()/exec() model.Simo Sorce3-26/+27
To start the dameon now you need to pass the option -s monitor Still have some problems communicating with children.
2008-11-19Add method to get a connection's private dataSimo Sorce3-7/+13
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.
2008-11-17The default message handler will now pass both the method_ctx and theStephen Gallagher3-21/+42
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.
2008-11-13Fix trailing spaces and some indentation issues.Simo Sorce1-46/+57
2008-11-04Add the ping funtion to the nss service Make the monitor task ping ↵Simo Sorce3-59/+77
connecting services Make it possible to configure timeouts and service ping times.
2008-11-03Add support for dbus comunication in the nss serviceSimo Sorce1-6/+5
Add utility function in confdb Make all component fetch the dbus socket from the confdb
2008-11-03Use a common interface file for all users of the internalSimo Sorce1-10/+1
sbus service.
2008-11-03Renaming sssd/server/dbus to sssd/server/sbus. Making necessary changes to ↵Stephen Gallagher6-0/+1260
header includes and makefiles.