summaryrefslogtreecommitdiffstats
path: root/server/providers/data_provider.c
Commit message (Collapse)AuthorAgeFilesLines
* remove the concept of a backend nameSumit Bose2009-09-021-11/+8
| | | | | | | | | | | The data provider backends stored a name value besides the domain name to identify themselves to the data provider. This was the name of the id provider. Currently the backends can have different providers for id, authentication etc. So the name may be missleading. Also when there are more domains with the same id provider the name is not enough to identify the backend but the domain name is. As a consequence the backend name is removed completely and only the domain name is used for identification.
* Fix reconnection codeSimo Sorce2009-08-171-2/+3
| | | | | | | Remove redundant reconnection code that was interfeering with the sbus reconnection code. Consolidate include files for sbus relates operations. Make pamsrv code similar to nsssrv code.
* Change the why DP clients identifySimo Sorce2009-08-111-131/+124
| | | | Mirrors what we have done with the monitor.
* Change services identification mechanismSimo Sorce2009-08-111-75/+11
| | | | | | | Let services identify themselves voiluntarily as the first operation instead of polling from the monitor. Also consolidate some common functions and make them available as monitor helpers.
* Make child processes exit when parent diesJakub Hrozek2009-08-111-0/+6
| | | | | | | | The child processes call prctl() and when their parent process is killed, they are sent SIGTERM using prctl. This is currently Linux-specific, for non-Linuxes, a similar effect is achieved by catching a set of common termination signals and sending SIGTERM to the process group.
* Simplify interfaces initializationSimo Sorce2009-08-101-47/+29
| | | | | | | 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-15/+5
| | | | | | 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-62/+62
| | | | | Rationalize and rename connection names in preparatoin for merging of server and connection structures.
* Remove redundant memory contextsSimo Sorce2009-08-101-11/+12
| | | | Simplify code by removing stuff that is never used or redundant.
* Implement resInit for monitor, NSS, PAM, DP and the backendsStephen Gallagher2009-07-201-0/+19
|
* check pending_return after dbus_connection_send_with_replySumit Bose2009-07-021-3/+3
|
* Implement credentials caching in pam responder.Simo Sorce2009-04-131-1/+0
| | | | | | | Implement credentials caching in pam responder. Currently works only for the proxy backend. Also cleanup pam responder code and mode common code in data provider. (the data provider should never include responder private headers)
* Add way to use files as a proxy backend fro LOCALSimo Sorce2009-04-011-8/+0
| | | | | | | | | | | | Makes LOCAL a normal backend removing some special handling. Fix/Add id range filtering and name filtering Filters uid=0 and gid=0 in the proxy backend as 0 is invalid within sysdb and was causing getxxent calls to fail completely. Fix nss_ncache_check_xxx calls to avoid dirtying the 'ret' variable and causing some unwanted failures. Change sysdb to always return the uid number when searching member entries so that id range filtering can be perfomed also in group searhes (does not work with legacy backends)
* Enhance server_setupSimo Sorce2009-03-201-2/+4
| | | | | | | Now it can load from scratch default configuration that is valid for all daemons. First thing, make it possible for each daemon/provider to set its own debug level in its configuration entry.
* use pam_data as main data structure for dbus communicationSumit Bose2009-03-191-47/+10
|
* Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce2009-02-261-2/+2
| | | | | | dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
* Add PAM responderSumit Bose2009-02-241-0/+274
| | | | | | | Also move responders under server/responder with shared code in server/responder/common Signed-off-by: Simo Sorce <ssorce@redhat.com>
* Proper fix for memory handling problem.Simo Sorce2009-02-241-21/+33
| | | | | | | | | | 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-21/+25
| | | | | | | | | | | | | | | 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.
* Fixing serious memory allocation bug in sbus_message_handler.Stephen Gallagher2009-02-231-25/+21
| | | | | | | | | | | | 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.
* Make backend requests asyncSimo Sorce2009-02-131-6/+0
|
* Refactoring the monitor code and SBUS utility functions.Stephen Gallagher2009-01-271-7/+26
|
* Fix return, dbus would abort because we were passing values andSimo Sorce2009-01-131-3/+3
| | | | | not pointers to values. Check domain is never null (or dbus will abort).
* Add placeholders for new configuration reload methods. The monitor will be ↵Stephen Gallagher2009-01-121-0/+12
| | | | able to call the reloadConfig DBUS method on any or all of its children to force them to reread their configuration from the confdb.
* Regroup database rleated functions under db andSimo Sorce2009-01-121-53/+0
| | | | rename everything with the sysdb suffix.
* Lots of little nasty bugs fixed.Simo Sorce2009-01-091-9/+21
| | | | | | | 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!
* The code now successfully sends a getpwnam request to a remote LDAP server,Simo Sorce2009-01-081-21/+34
| | | | | | and caches the result in LDAP. Still chasing a bug that does not let NSS known that the BE was successful. This makes NSS timeout the client and not return any results yet.
* Add more infrastructure to data provider to dispatch requests (still untested).Simo Sorce2009-01-061-9/+334
| | | | | Add helper functions to connect to the data provider. Add some plumbing to the ldap provider (still untested).
* Fix dp client to connect to the right dbus pipeSimo Sorce2009-01-051-8/+8
|
* 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.
* Adding a parameter to the sbus_service_sbus_init function to allow passing ↵Stephen Gallagher2008-12-151-1/+1
| | | | in an sbus_conn_destructor_fn to the sbus_new_connection() function. Fixing minor warning about the usage of talloc_reference.
* Disconnected client SBUS connections would delete the master set of ↵Stephen Gallagher2008-12-151-1/+5
| | | | | | | | 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.
* Fix dbus related memory leaksSimo Sorce2008-12-091-8/+12
|
* Change data provider into a hub, where backends (ldap, nis, ipa providers)Simo Sorce2008-12-081-131/+225
| | | | and frontends (pam, nss, ... modules) can connect to.
* Make a binary out of each major sssd component instead ofSimo Sorce2008-11-251-0/+43
| | | | using the same binary to fork off all services.
* Remove the service stuff that we stopped using when we moved toSimo Sorce2008-11-251-1/+0
| | | | the forl/exec model
* point PIPE_PATH at /var/lib/sss/pipes, not just the private path so that theSimo Sorce2008-11-241-1/+2
| | | | same config option can be used for the nss service
* Replacing hard-coded paths with configure script substitutions.Stephen Gallagher2008-11-241-18/+50
| | | | Changing the default SBUS locations to be configure script parameters
* change structure nameSimo Sorce2008-11-241-4/+5
|
* Created a helper function sssd_service_sbus_init() to simplify creating the ↵Stephen Gallagher2008-11-201-42/+12
| | | | 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.
* Remove unused code and fix message handlers in dpSimo Sorce2008-11-201-24/+10
|
* Start conversion from a fork() and live to a fork()/exec() model.Simo Sorce2008-11-201-22/+18
| | | | | To start the dameon now you need to pass the option -s monitor Still have some problems communicating with children.
* Add some infrastructure code to add data providers.Simo Sorce2008-11-191-0/+414
This currently breacks the dameon because of a problem with destroying the monitor dbus server in the children after fork()