summaryrefslogtreecommitdiff
path: root/server/nss/nsssrv.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-24Add PAM responderSumit Bose1-589/+0
Also move responders under server/responder with shared code in server/responder/common Signed-off-by: Simo Sorce <ssorce@redhat.com>
2009-02-24Proper fix for memory handling problem.Simo Sorce1-9/+22
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 Sorce1-12/+16
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-23Fixing serious memory allocation bug in sbus_message_handler.Stephen Gallagher1-16/+12
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-20Completely rework the nss interface to be able to use 2Simo Sorce1-7/+53
types of domains: modern and legacy modern uses member/meberof, legacy uses memberUid for group memberships. Rework the proxy backend to use the legacy style as that's the format the data comes in (trying to convert would require too many transformations and increased the number of queries). Add support for fetching groups in nss. Add support for enumerating users and groups (requires to enable enumeration in config) both in nss and in the proxy provider. Remove confdb_get_domain_basedn() and substitute with generic calls in the nss init function. Store a domain structure in the btree not the basedn so that we can add enumeration flags. Also make sure NSS understand how to make multiple calls on enumerations, also make passing the domian parameter always mandatory, passing in domain=* is not valid anymore. This work fixes also a few memory, degfault, and logic bugs found while testing all nss functions (there are still some to fix that are less critical and much harder to find yet).
2009-02-16Enhancements and bugfixes to util/btreemap.c 1) Remove useless and unused ↵Stephen Gallagher1-4/+4
btreemap_new() 2) Fix potentially serious memory allocation error. btreemap now requires a TALLOC_CTX to be passed in for assignment to the top node of the tree. Previously it was creating a new root TALLOC_CTX 3) Add new function btreemap_get_keys that will return a sorted array (newly allocated using talloc_realloc()) of keys (const void *) 4) Change the btreemap to use (const void *) keys instead of (void *)
2009-02-13Always pass teh database path explicitly, so that test cases can useSimo Sorce1-1/+1
throw away databases Check version and init main db if empty
2009-01-27Refactoring the monitor code and SBUS utility functions.Stephen Gallagher1-7/+26
2009-01-12Add checks to make sure we are getting a user from the correct domain.Simo Sorce1-1/+12
2009-01-12Add placeholders for new configuration reload methods. The monitor will be ↵Stephen Gallagher1-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.
2009-01-12Regroup database rleated functions under db andSimo Sorce1-3/+2
rename everything with the sysdb suffix.
2009-01-11Add caching behavior to nsssrv_cmd.c check cache first andSimo Sorce1-0/+2
dispatch to backends only if we have a cache miss.
2009-01-09Lots of little nasty bugs fixed.Simo Sorce1-2/+12
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-08The code now successfully sends a getpwnam request to a remote LDAP server,Simo Sorce1-2/+9
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.
2009-01-07Check size of incoming packets.Simo Sorce1-1/+2
This should fix a buffer overflow waiting to be exploited :/
2009-01-06Add initial support to connect nss to the data provider as a frontendSimo Sorce1-0/+7
2009-01-06Change cli_ctx to include nss_ctx, not just select members of it.Simo Sorce1-1/+1
2008-12-15Adding a parameter to the sbus_service_sbus_init function to allow passing ↵Stephen Gallagher1-1/+1
in an sbus_conn_destructor_fn to the sbus_new_connection() function. Fixing minor warning about the usage of talloc_reference.
2008-12-08Change data provider into a hub, where backends (ldap, nis, ipa providers)Simo Sorce1-8/+7
and frontends (pam, nss, ... modules) can connect to.
2008-11-25Make a binary out of each major sssd component instead ofSimo Sorce1-0/+43
using the same binary to fork off all services.
2008-11-25Remove the service stuff that we stopped using when we moved toSimo Sorce1-1/+0
the forl/exec model
2008-11-24point PIPE_PATH at /var/lib/sss/pipes, not just the private path so that theSimo Sorce1-1/+11
same config option can be used for the nss service
2008-11-24Fix indentationSimo Sorce1-9/+9
2008-11-20Created a helper function sssd_service_sbus_init() to simplify creating the ↵Stephen Gallagher1-44/+13
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-20Remove unused code and fix message handlers in dpSimo Sorce1-25/+10
2008-11-20Start conversion from a fork() and live to a fork()/exec() model.Simo Sorce1-23/+19
To start the dameon now you need to pass the option -s monitor Still have some problems communicating with children.
2008-11-19Move definition into the header fileSimo Sorce1-0/+1
2008-11-17The default message handler will now pass both the method_ctx and theStephen Gallagher1-0/+1
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-07Store all domains served by the SSSD to a binary-tree map for fast NSS lookup.Stephen Gallagher1-2/+56
Changed the "section" feature of confdb.c to use '/' as a delimiter instead of '.', because this conflicted with the ability to use dots in domain names.
2008-11-04Add the ping funtion to the nss service Make the monitor task ping ↵Simo Sorce1-0/+17
connecting services Make it possible to configure timeouts and service ping times.
2008-11-03Add support for dbus comunication in the nss serviceSimo Sorce1-31/+130
Add utility function in confdb Make all component fetch the dbus socket from the confdb
2008-10-21Make return the pid when new process are started.Simo Sorce1-6/+32
Monitor each service and restart it conditionally if it fails. These monitoring is extremely simple at this moment and just uses waitpid() to check if the client is alive, there is no active probing, that will require dbus. Make nsssrv.c read the sss pipe config option for the config db.
2008-10-20Add configuration database functions.Simo Sorce1-2/+10
Convert nss responder to use the confdb
2008-10-09Use classic errno instead of inventing our own, it's broad enough fro atm.Simo Sorce1-7/+7
2008-10-08First retrieval of a user (getpwnam only) from an actual ldb fileSimo Sorce1-3/+12
2008-10-07Add primitive debugging capabilities.Simo Sorce1-2/+5
So far debug goes to stderr so sssd need to be run int interactive mode (-i option)
2008-10-06First working daemon that responds only to a getpwnam() request with fake dataSimo Sorce1-56/+47
2008-10-04Add initial nss responder skeletonSimo Sorce1-0/+252