summaryrefslogtreecommitdiff
path: root/src/monitor/monitor.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-21Don't give memory context in confdb where not neededJan Zeleny1-4/+4
2012-02-21remove unused functionJakub Hrozek1-20/+0
2012-02-07SSH: ResponderJan Cholasta1-1/+2
2012-02-05AUTOFS: responderJakub Hrozek1-1/+1
2011-12-20MONITOR: use sigchld handler for monitoring SSSD servicesStephen Gallagher1-177/+159
2011-12-16SUDO Integration - responderPavel Březina1-1/+1
2011-12-13Cancel ping_check if service goes awayJakub Hrozek1-1/+14
https://fedorahosted.org/sssd/ticket/1090
2011-12-08Added sssd --version optionPavel Březina1-2/+10
https://fedorahosted.org/sssd/ticket/953
2011-11-22Set more strict permissions on keyringSimo Sorce1-0/+27
We want to confine access to the keyring to the current process and not let root easily peek into the keyring contents.
2011-10-17MONITOR: fix timeout conversionStephen Gallagher1-1/+1
2011-10-13Append PID to sbus server socket name, let clients use a symlinkJakub Hrozek1-1/+1
https://fedorahosted.org/sssd/ticket/1034
2011-10-13Add option to follow symlinks to check_file()Jakub Hrozek1-1/+1
2011-09-28Multiline macro cleanupJakub Hrozek1-1/+2
This is mostly a cosmetic patch. The purpose of wrapping a multi-line macro in a do { } while(0) is to make the macro usable as a regular statement, not a compound statement. When the while(0) is terminated with a semicolon, the do { } while(0); block becomes a compound statement again.
2011-09-15MONITOR: Correctly detect lack of response from servicesStephen Gallagher1-21/+26
We were incorrectly using DBUS_ERROR_TIMEOUT here. The correct behaviour is to check for DBUS_ERROR_NO_REPLY. This way we will properly handle the three-tries in the tasks_check_handler(). Additionally, we weren't properly handling failure counts correctly, meaning we weren't restarting stuck services in a timely manner.
2011-09-08DEBUG timestamps offer higher precisionPavel Březina1-2/+26
https://fedorahosted.org/sssd/ticket/956 Added: --debug-microseconds=0/1 Added: debug_microseconds to sssd.conf
2011-09-06Change libnl monitor callback to only signal going onlineJakub Hrozek1-5/+3
This feature was not used and would probably never be used, because it is much safer to rely on online actions to time out. Moreover, it would make implementing the new features more complex.
2011-09-02Add option to specify the kerberos replay cache dirStephen Gallagher1-0/+31
Adds a configure option to set the distribution default as well as an sssd.conf option to override it. https://fedorahosted.org/sssd/ticket/980
2011-08-25--debug-timestamps=1 is not passed to providersPavel Březina1-44/+69
https://fedorahosted.org/sssd/ticket/972 --debug-timestamps=1 is now passed to providers
2011-08-25New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0Pavel Březina1-3/+7
Removed: SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED) Added new macro: CONVERT_AND_SET_DEBUG_LEVEL(new_value) Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0 so DEBUG macro could be reduced by one condition. Anyway, it has a minor effect, every time you want to load debug_level from command line parameters, you have to use following pattern: /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { ... } CONVERT_AND_SET_DEBUG_LEVEL(debug_level);
2011-08-25New DEBUG facility - conversionPavel Březina1-2/+3
https://fedorahosted.org/sssd/ticket/925 Conversion of the old debug_level format to the new one. (only where it was necessary) Removed: SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT)
2011-06-24Fall back to polling when inotify failsJan Zeleny1-28/+68
2011-05-23Import config.h earlierStephen Gallagher1-2/+1
On RHEL 5 and other older platforms, failing to set _GNU_SOURCE early would cause some functions - such as strndup() - to be unavailable.
2011-05-23Set _GNU_SOURCE globallySumit Bose1-1/+0
2011-05-16Fixed --debug-to-files for nss and pam servicesJan Zeleny1-4/+4
This error caused that monitor didn't pass --debug-to-files option to nss and pam services when creating them.
2011-05-06Allow changing the log level without restartStephen Gallagher1-1/+3
We will now re-read the confdb debug_level value when processing the monitor_common_logrotate() function, which occurs when the monitor receives a SIGHUP.
2011-05-04Override config file debug_level with command-lineStephen Gallagher1-13/+50
This patch also makes the following changes: 1) The [sssd] debug_level setting no longer acts as a default for all other sections. 2) We will now skip passing the debug argument to the child processes from the master unless the SSSD was run with a command-line argument for the debug level. https://fedorahosted.org/sssd/ticket/764
2011-01-17Clarify nscd warningStephen Gallagher1-4/+5
Removes the level-zero DEBUG message and modifies the syslog message to explain that NSCD is safe for maps that SSSD does not (yet) support.
2010-12-14Prevent uninitialized value error in monitor_quitStephen Gallagher1-0/+1
https://fedorahosted.org/sssd/ticket/724
2010-12-02Set up signal handlers before initializing sysdbStephen Gallagher1-38/+38
A temporary signal handler for SIGTERM is set up in server_setup() that calls exit() from within a pure signal handler. This causes a race condition where it's possible that if the SSSD is restarted immediately while it is still initializing the sysdb caches for the first time, it can leave the cache in a corrupt and unusable state. https://bugzilla.redhat.com/show_bug.cgi?id=658444
2010-12-02Resend SIGTERM if child doesn't terminateStephen Gallagher1-24/+40
There is a race condition where if we send a SIGTERM before the kernel has scheduled the child, it may be lost, and the child will not terminate and will leave the monitor hung in wait(). This patch alters this behavior so that we will send the SIGTERM again every 10ms and check the wait() in a nonblocking manner.
2010-12-01Daemonize by defaultSumit Bose1-0/+4
2010-11-22Add SIGUSR2 to reset offline statusSumit Bose1-0/+29
2010-11-18Wait for all children to exitStephen Gallagher1-2/+61
Previously, there was a race-condition where the monitor might terminate before its children.
2010-11-16Log startup errors to syslogStephen Gallagher1-7/+9
2010-09-08Dead assignments cleanup in various places in SSSDJan Zeleny1-0/+3
Three assignments deleted, two return code inspection added. Also found and fixed one critical bug caused by dead assignment. Ticket: #590
2010-07-09Use netlink to detect going onlineJakub Hrozek1-0/+30
Integrates libnl to detect adding routes. When a route is added, the offline status of all back ends is reset. This patch adds no heuristics to detect whether back end went offline. Fixes: #456
2010-07-09Add try_inotify optionStephen Gallagher1-1/+18
There are some special cases where inotify cannot be used, even if the host OS claims that it is supported. In these cases, it should be possible to explicitly disable the use of inotify. https://fedorahosted.org/sssd/ticket/484
2010-06-28Resend SIGINT as SIGTERM in servicesJakub Hrozek1-0/+1
Fixes: #462
2010-06-10Check the correct variable for NULL after creating timerStephen Gallagher1-2/+2
In several places, we were creating a new timer and assigning it to the tev variable, but then we were checking for NULL from the te variable (which, incidentally, is guaranteed never to be NULL in this situation) https://fedorahosted.org/sssd/ticket/523
2010-06-10Properly handle read() and write() throughout the SSSDStephen Gallagher1-2/+2
We need to guarantee at all times that reads and writes complete successfully. This means that they must be checked for returning EINTR and EAGAIN, and all writes must be wrapped in a loop to ensure that they do not truncate their output.
2010-05-27Move parse_args() to utilSumit Bose1-100/+0
2010-04-26Fix a potential memory violationSumit Bose1-2/+4
If read() returns with errno set to EINTR -1 is added to total_len.
2010-04-12sysydb: Finally stop using a common event contextSimo Sorce1-1/+1
This commit completes the migration to a synchronous sysdb
2010-03-25Fix warnings from -Wmissing-field-initializersSumit Bose1-1/+1
This patch removes some tab-indentations from pamsrv.c, too.
2010-03-22Add generic error messageJakub Hrozek1-0/+4
2010-03-22Fix config file error messageJakub Hrozek1-1/+1
2010-03-19Fix multiple errors with destructors.Simo Sorce1-2/+22
This commits cleans up 3 segfaults/valgrind errors due to access to freed memory. 1. The spy wasn't clearing conn_spy causing the svc_destructor to try to clear the spy destructor when the spy was already freed 2. get_config_service was not setting the svc_destrcutor on services depending on the orderof frees at exit this was causing the spy destructor to try to access freed memory because it was not neutralized when the service was freed. 3. at exit the mt_ctx could be freed before services causing the svc_destrcutor to try to access freed memory when removing the service from the service list in the monitor context.
2010-03-19Fix invalid read cause by premature free of tmpctxSimo Sorce1-13/+10
2010-03-17Fix a series of memory leaks in the SBUSStephen Gallagher1-6/+13
2010-03-15Properly handle dbus send attempts on a closed connectionStephen Gallagher1-45/+9
dbus_connection_send_with_reply() will report success and return a NULL pending_reply when the connection is not open for communication. This patch creates a new wrapper around dbus_connection_send_with_reply() to properly detect this condition and report it as an error.