summaryrefslogtreecommitdiff
path: root/server/infopipe
AgeCommit message (Collapse)AuthorFilesLines
2009-03-02Do not steal memory in btreemaps.Simo Sorce1-39/+17
Just make sure that the memory passed in is either static or allocated on the same memory context that is parent of the btreemap.
2009-03-02Support byte arrays in InfoPipe GetUserAttributesStephen Gallagher1-27/+80
We now have support for reading binary blobs such as userpic from the sysdb and returning it to an InfoPipe consumer as a byte array. I also cleaned up some code in create_getattr_result_map to make it easier to read.
2009-03-02Implement GetUserAttributes in the InfoPipeStephen Gallagher6-53/+779
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.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce4-4/+4
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-25Adding InfoPipe entry to config.ldif exampleStephen Gallagher1-1/+1
Also updating the .gitignore file to not ignore config.ldif Signed-off-by: Simo Sorce <ssorce@redhat.com>
2009-02-25Simplify the code to retrieve the introspection file.Simo Sorce1-31/+50
2009-02-25Store the InfoPipe introspection XML for subsequent requests.Stephen Gallagher2-13/+18
Right now, the introspection XML file is read in every time a client service requests it. Since the XML cannot change during process lifetime, we'll store it on the infp_ctx object so we don't need to hit the filesystem for requests after the first.
2009-02-24Fix SEGFAULT in CheckPermissionsStephen Gallagher1-1/+2
2009-02-24Proper fix for memory handling problem.Simo Sorce5-59/+157
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()
2009-02-24Revert "Fixing serious memory allocation bug in sbus_message_handler."Simo Sorce4-61/+70
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.
2009-02-24Adding support for CheckPermissions to InfoPipe.Stephen Gallagher5-4/+322
CheckPermissions will currently return unrestricted access to the root user, and no access to any other user. Once we decide on an ACL mechanism, this will be easy to change. I have also added very basic tests for the Introspect and CheckPermissions methods.
2009-02-24Add D-BUS introspection to InfoPipe This function is necessary to play nice ↵Stephen Gallagher2-3/+76
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 Gallagher4-53/+50
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 Gallagher8-32/+609
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-01-27Preliminary support for enabling InfoPipe to listen on the D-BUS system bus. ↵Stephen Gallagher5-1/+158
It will connect and authenticate successfully (using the included D-BUS policy file installed in the correct /etc directory. Does not yet listen for requests.
2009-01-27Add skeleton for InfoPipe serviceStephen Gallagher2-0/+219