Operating Principles |
The Dr.Web ConfigD configuration management daemon always runs with superuser privileges (root). It starts other Dr.Web Mail Security Suite components and communicates with them via a preliminarily open socket. The configuration daemon accepts connections from other Dr.Web Mail Security Suite components via an information socket (publicly accessible) and an administrative socket (accessible only to the components running with superuser privileges). The daemon loads configuration parameters and license information from files or receives this information from a centralized protection server via Dr.Web ES Agent and sets valid default values of the configuration parameters. By the time any component starts or receives the SIGHUP signal, the configuration management daemon has a comprehensive and consistent set of configuration parameters for all Dr.Web Mail Security Suite components. Upon receiving the SIGHUP signal, Dr.Web ConfigD reloads the configuration parameters and license information. If required, the daemon also instructs all components to reload their configuration parameters. Upon receiving the SIGTERM signal, Dr.Web ConfigD shuts down all components and then finishes its own operation. Dr.Web ConfigD removes all temporary files of the components after they are shut down. Principles of Interaction with Other Components 1.All components receive the configuration parameters and license information from Dr.Web ConfigD at startup. Only these settings are used by the components in their further operation. 2.Dr.Web ConfigD forwards messages from all components started with it to a unified log. All messages output to stderr by the components are gathered by Dr.Web ConfigD and stored in the unified log of Dr.Web Mail Security Suite with a mark indicating the component that reported an error and time of its occurrence. 3.Upon shutting down, all controlled components return an exit code. If the code differs from 101, 102 and 103, the component will be restarted and the corresponding message from stderr will be output to the Dr.Web Mail Security Suite log. •Code 101 is returned when the component cannot operate with the current license. The component will be restarted only after the license parameters are modified. •Code 102 is returned when the component cannot operate with the current configuration parameters. If some configuration parameters were modified, Dr.Web ConfigD will try to restart the component. •Code 103 is returned in case the components started by Dr.Web ConfigD upon request (Dr.Web Scanning Engine and Dr.Web File Checker) have been idle for a long time. The timeout after which the component is shut down with error code 103 is specified in the settings of the corresponding component (the IdleTimeLimit parameter). •If new configuration parameters received from Dr.Web ConfigD by the component cannot be applied on the fly, the component exits with code 0 so that Dr.Web ConfigD can restart it. •If the component cannot connect to Dr.Web ConfigD or a communication protocol error occurs, the component outputs a corresponding message to stderr and exits with code 1. 4.Signal exchange is maintained. •Dr.Web ConfigD sends the SIGHUP signal to the component instructing it to apply the modified configuration parameters. •Dr.Web ConfigD sends the SIGTERM signal to the component instructing it to shut down. After receiving the signal, the component should shut down within 30 seconds. •If the component does not shut down within 30 seconds, Dr.Web ConfigD sends the SIGKILL signal to forcibly shut down the component. |