summaryrefslogtreecommitdiffstats
path: root/server/monitor
Commit message (Collapse)AuthorAgeFilesLines
* Fix tight-loop in monitor part 2Stephen Gallagher2009-12-171-0/+5
| | | | | The first fix only fixed tight loops caused by setting 'timeout=0' in services. This patch also fixes it for domains.
* Fix tight loop in monitorStephen Gallagher2009-12-151-0/+5
| | | | | | If the domain heartbeat time was explicitly set in the configuration to 0, we would enter a tight loop in the heartbeat check and never answer requests from the child processes.
* Properly deny id_provider=filesStephen Gallagher2009-12-091-6/+0
|
* Do not start with provider=filesJakub Hrozek2009-12-081-0/+6
| | | | Fixes: #233
* Check the services started against a list of known servicesJakub Hrozek2009-12-031-0/+29
| | | | Fixes: #241
* Warn visibly about permission problems with the config fileJakub Hrozek2009-12-011-1/+8
| | | | Fixes: #268
* Raise some timeoutsSimo Sorce2009-11-201-1/+1
| | | | | When using high debug levels or valgrind the code maybe slow enough that these timeouts were too strict.
* Delete sssd-i18n.h and put it's old contents into util.hMartin Nagy2009-10-221-1/+0
| | | | Also include talloc.h, tevent.h and ldb.h as system headers in util.h.
* Remove warnings caused by 5e2301b8a75d10e5cbbe11e26e5192b894af6ad7Stephen Gallagher2009-10-151-0/+8
| | | | | There were unused functions still being compiled. This will suppress them until we turn live configuration updates back on.
* Fix services startup when only LOCAL is configuredSimo Sorce2009-10-131-0/+3
|
* Start responders predictably after providersSimo Sorce2009-10-091-52/+147
| | | | | | | | | | | | | Instead of waiting an arbitrary timeout, start all providers first, and wait for all of them to reply to the monitor before starting other services. Add a timeout handler so that services are started even if one of the providers fails to actually register back to the monitor. Also fixes services destructors delist_service was overriding the natural svc destructor. remove the offending code and make the svc_destructor always try to remove a service from the service list, if the service is not listed it will just be a noop.
* Remove DP processSimo Sorce2009-10-091-38/+17
| | | | | Turn the backend process into data provider servers Make Frontends (pam, nss) directly attach to the backends
* add utility call check_and_open_readonlySumit Bose2009-10-051-1/+1
| | | | | Use this new utility call to ensure that the config file is safe to read from.
* Send debug messages to logfileJakub Hrozek2009-09-251-3/+15
| | | | | | | | | | | | | Introduces a new option --debug-to-files which makes SSSD output its debug information to a file instead of stderr, which is still the default. Also introduces a new confdb option debug_to_files which does the same, but can be specified per-service in the config file. The logfiles are stored in /var/log/sssd by default. Changes the initscript to log to files by default.
* Upgrade confdb to version 2Stephen Gallagher2009-09-253-35/+25
| | | | | This converts a great many configuration options to the new standard format.
* Temporarily disable automatic config file rereadStephen Gallagher2009-09-251-1/+7
| | | | | | | | | The backends do not honor the reloadConfig SBUS message right now, so if an admin changes the sssd.conf file, it will update only the monitor, potentially leaving the SSSD as a whole in a bad state. This patch will simply comment out monitor_config_file() for the time being until https://fedorahosted.org/sssd/ticket/91 is fixed.
* Handle suspend casesSimo Sorce2009-09-241-6/+13
| | | | | | When a laptop is suspended it may be dormant for hours. Do not check just the kast time a ping was successful, keep a counter with the failed pings instead.
* Revert "Use syslog for logging error conditions in SSSD"Stephen Gallagher2009-09-232-102/+95
| | | | | | | | This reverts commit 8c50bd085c0efe5fde354deee2c8118887aae29d. Amended: commit 1016af2b1b97ad4290ccce8fa462cc7e3c191b2e also made use of the SYSLOG_ERROR() macro, so those portions of that code also needed to be reverted.
* Use syslog for logging error conditions in SSSDJakub Hrozek2009-09-212-95/+102
| | | | | This is just a band-aid until ELAPI is fully functional and ready to use.
* Exit if the sssd is launched as a user other than rootStephen Gallagher2009-09-111-0/+9
|
* Fix first-time confdb generationStephen Gallagher2009-09-111-1/+1
| | | | We were talloc_free()-ing the cdb_file string too early.
* Read the configuration parsing before daemonizationStephen Gallagher2009-09-102-83/+106
| | | | | | | We will now parse the config file and validate the confdb contents before processing the rest of the monitor startup. This will allow us to return an appropriate error code to the shell if the configuration is invalid.
* Remove unused event context argument from confdb_initStephen Gallagher2009-09-101-1/+1
| | | | | | Because the confdb always operates synchronously, it maintains its own private event context internally. The event context argument passed to it is never used, so we'll remove it to avoid confusion.
* Split database in multiple filesSimo Sorce2009-09-081-10/+7
| | | | | The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
* remove the concept of a backend nameSumit Bose2009-09-021-2/+2
| | | | | | | | | | | 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.
* Ensure that only one local domain is configuredStephen Gallagher2009-08-181-1/+32
|
* Fix reconnection codeSimo Sorce2009-08-173-35/+10
| | | | | | | 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.
* Prevent races between dp startup and othersSimo Sorce2009-08-111-16/+26
| | | | Simply delay anything other service by 1 second only at startup.
* Change services identification mechanismSimo Sorce2009-08-114-198/+371
| | | | | | | 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.
* Fix monitor ping timeoutStephen Gallagher2009-08-111-1/+4
| | | | | | | | | | | | Our configuration specifies the monitor config timeout as seconds, but we were passing it directly to dbus commands that require milliseconds. Fixing this in get_monitor_config(). Also, the default value of -1 for the timeout resulted in a timeout much too short to be useful, so I'm making it 10s instead. This fix solves the problem where a busy backend (for example, one that is enumerating a large number of LDAP entries) would fail to respond to the ping in time.
* Simplify interfaces initializationSimo Sorce2009-08-104-87/+37
| | | | | | | 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-4/+3
| | | | | | 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-40/+40
| | | | | Rationalize and rename connection names in preparatoin for merging of server and connection structures.
* Remove redundant memory contextsSimo Sorce2009-08-101-17/+11
| | | | Simplify code by removing stuff that is never used or redundant.
* Minor cleanups in monitor.cStephen Gallagher2009-07-221-1/+5
| | | | | 1) Forgot to check for successful allocation 2) Used the wrong mem_ctx when allocating a timer event.
* Add option to add timestamps to debug outputSimo Sorce2009-07-201-4/+7
| | | | | use '--debug-timestamps' at the command line or set 'debug-timestamps = TRUE' in the configuration file.
* Implement resInit for monitor, NSS, PAM, DP and the backendsStephen Gallagher2009-07-201-1/+13
|
* Monitor resolv.conf for changesStephen Gallagher2009-07-203-126/+234
| | | | | | | | | | | | | | | | | | | This patch updates the monitor_config_file() functions so that they can monitor any number of files and invoke a specified callback whenever they are modified. When inotify is available, we will add an additional watch descriptor to the inotify file descriptor. When inotify is not available, the polling function will simply loop to check each file in the monitor list. When changes are discovered in resolv.conf, the monitor will send a "resInit" signal to all of its known children. They are only required to handle this function if they need updated DNS information. Services that do not implement resInit should return DBUS_ERROR_UNKNOWN_METHOD (rather than timing out) with no ill effects.
* Improvements to config file updatesStephen Gallagher2009-07-201-40/+150
| | | | | | | | | | | | | | | 1) Some text editors will create a new file and move it into place on top of the existing file. When this happens, the kernel issues an IN_IGNORE inotify event and automatically removes the watch descriptor for that file. We'll handle the event and create a new watch descriptor for the new file. We will attempt to rewatch the file six times at five-second intervals. 2) Some scripts may append new data to the config file in several steps (such as calling echo "foo" >> sssd.conf several times). In order to handle these scripts safely, we'll defer processing of inotify events for one second after the first is detected. This should be ample time for the remainder of the script to complete.
* Adding wrappers to free data in INI API.Dmitri Pal2009-07-021-4/+2
| | | | See ticket #37 in sssd track.
* check pending_return after dbus_connection_send_with_replySumit Bose2009-07-021-4/+4
|
* Eliminate segfault on first start-upStephen Gallagher2009-06-301-6/+19
| | | | | | | | There was a typo in the confdb setup portion of the monitor_process_init that was attempting to use the wrong cdb object to initialize. This patch also adds some missing talloc_free() calls on error.
* Protect against segfault in service_signal_reloadStephen Gallagher2009-06-191-0/+9
| | | | | | | There is a potential race condition where the monitor may attempt to signal a reload of a child process before the communication sbus channel is available. If this happens, we will just exit this function and let the monitor kill and restart the child process.
* Fix segfault in update_monitor_configStephen Gallagher2009-06-191-8/+26
| | | | | | | We were stealing the memory context of only the first value in the linked-list of domains (and also services). This patch adds a memory context to hold the lists so that can be stolen along with all of the entries.
* Make Data Provider a mandatory serviceJakub Hrozek2009-05-281-0/+32
|
* Stop overwriting the stackSimo Sorce2009-05-261-2/+2
| | | | Actually use the buffer not it's location on the stack.
* Read the config before startup, fail if cannot be readJakub Hrozek2009-05-261-0/+26
|
* Treat the local provider as a special caseStephen Gallagher2009-05-151-1/+16
| | | | | | | The local provider needs no backend, so we'll create a special provider entry for it called "local" that will not attempt to retrieve provider configuration but will remain in the service list so it can be updated when the config file changes.
* Check for valid ID range, domains overlapJakub Hrozek2009-05-141-0/+36
|
* Fix warnings in monitor.c and confdb.cStephen Gallagher2009-05-121-6/+12
|