summaryrefslogtreecommitdiff
path: root/server/monitor.c
AgeCommit message (Collapse)AuthorFilesLines
2009-01-27Refactoring the monitor code and SBUS utility functions.Stephen Gallagher1-1005/+0
2009-01-14Add code to make it easier to reconnect in case the serverSimo Sorce1-12/+23
is not available immediately or drops the dbus connection. First step is the nss connection to the data provider.
2009-01-13Monitor will now start services asynchronously. This means that forked ↵Stephen Gallagher1-21/+57
services can no longer start before the monitor is running its mainloop. This avoids the race condition where the child services attempted to connect to the monitor SBUS before it was able to answer requests.
2009-01-09If exec() returns in start_service (for example, if the command contains a ↵Stephen Gallagher1-2/+10
typo and therefore doesn't exist), we cannot call exit() due to a bug in D-BUS. We will replace this with _exit() and also print out the nature of the error that caused exec() to return.
2009-01-09Lots of little nasty bugs fixed.Simo Sorce1-1/+1
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-1/+1
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-06fix typoSimo Sorce1-1/+1
2009-01-05Fix dp client to connect to the right dbus pipeSimo Sorce1-0/+8
2008-12-22libevents renamed upstream to libteventSimo Sorce1-1/+1
events.h -> tevent.h
2008-12-15Modified sbus_server_new() to take a talloc memory context to useStephen Gallagher1-1/+1
as a parent for the new server context object.
2008-12-15Disconnected client SBUS connections would delete the master set of ↵Stephen Gallagher1-8/+10
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-10Convert leading tabs to 4 spacesSimo Sorce1-20/+20
2008-12-09Fix dbus related memory leaksSimo Sorce1-5/+13
2008-12-08Change data provider into a hub, where backends (ldap, nis, ipa providers)Simo Sorce1-0/+54
and frontends (pam, nss, ... modules) can connect to.
2008-11-25Make a binary out of each major sssd component instead ofSimo Sorce1-1/+64
using the same binary to fork off all services.
2008-11-24Replacing hard-coded paths with configure script substitutions.Stephen Gallagher1-1/+10
Changing the default SBUS locations to be configure script parameters
2008-11-20Make it possible to use an arbitrary command to start servicesSimo Sorce1-10/+121
2008-11-20Start conversion from a fork() and live to a fork()/exec() model.Simo Sorce1-13/+47
To start the dameon now you need to pass the option -s monitor Still have some problems communicating with children.
2008-11-19Add some infrastructure code to add data providers.Simo Sorce1-9/+10
This currently breacks the dameon because of a problem with destroying the monitor dbus server in the children after fork()
2008-11-17The default message handler will now pass both the method_ctx and theStephen Gallagher1-1/+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-4/+4
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-05Set floor to ping time or the monitor will get crazy trying to pingSimo Sorce1-1/+7
children thousands of times per second.
2008-11-04Add the ping funtion to the nss service Make the monitor task ping ↵Simo Sorce1-90/+410
connecting services Make it possible to configure timeouts and service ping times.
2008-11-03Add support for dbus comunication in the nss serviceSimo Sorce1-4/+9
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-5/+1
sbus service.
2008-11-03Renaming sssd/server/dbus to sssd/server/sbus. Making necessary changes to ↵Stephen Gallagher1-1/+1
header includes and makefiles.
2008-11-03Refactoring dbus code. Also corrected one talloc allocation mistake for ↵Stephen Gallagher1-11/+11
sbus_dispatch.
2008-11-03Moved method handling into sssd_dbus_connection.c. Added support for ↵Stephen Gallagher1-6/+103
handling multiple D-BUS paths in a connection. Added support for per-connection method setup. Added support for per-connection specialized destructors. Added mandatory getIdentity call for all services connecting to the monitor. If they do not present an identity (expose the getIdentity method and respond with name and version), they are dropped immediately. Other minor fixes.
2008-11-03Cleaning up improper whitespaceStephen Gallagher1-1/+1
2008-11-03Fixed segfault issue when remote connection is lost.Stephen Gallagher1-8/+8
2008-11-03Initial memory cleanup workStephen Gallagher1-1/+4
2008-10-27D-BUS integration style changes.Simo Sorce1-96/+71
Rework interfaces a bit to simplify and uniform function names so that they use a well defined namespace (sssd_*). Simplify headers file, split them into a private and a public one only. Make static all file private functions. Rename sssd_dbus_client.c to sssd_dbus_connection.c to reflect it's function, as it is is used by both a server and a client. Introduce a function table to know where to dipatch messages. Fix coding style issues, and start pointing out where clean-up fucntions are missing.
2008-10-24Integrate D-BUS support for use as IPC between parts.Stephen Gallagher1-6/+102
Integrates DBUS with the event system so that it is asynchronous.
2008-10-21Make return the pid when new process are started.Simo Sorce1-106/+100
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-04Initital server code.Simo Sorce1-0/+168
Includes test monitor task.