The Dr.Web ConfigD component is always run as root. It starts the other Dr.Web for UNIX Mail Servers components and interacts with the them via the preliminarily open socket. The configuration management daemon can accept connections from the other components of the Dr.Web for UNIX Mail Servers via the information socket (accessible to all components) and via the managing socket (accessible only to the components run as root). It loads the configuration and the license information from files or from the centralized protection server via the . It sets the correct default values for the configuration parameters. By the time when any component starts or receives a SIGHUP signal Dr.Web ConfigD has a comprehensive and consistent set of configuration parameters for all Dr.Web for UNIX Mail Servers components.
Upon the receipt of a SIGHUP signal, Dr.Web ConfigD re-reads the configuration parameters and the license information. If required, the daemon sends to all components notifications instructing them to re-read their configuration.
Upon the receipt of a SIGTERM signal, Dr.Web ConfigD shuts down all components and then finishes its own operation. Dr.Web ConfigD also removes all temporary files of the components after they are shut down.
Component Interaction Principles
1.At startup all components receive the configuration parameters and the license information from Dr.Web ConfigD. Only this parameters are used in further operation.
2.The daemon collects messages from all the controlled components into an integrated log. All information output to stderr component is collected by Dr.Web ConfigD and written to the integrated log of Dr.Web for UNIX Mail Servers with a mark indicating what component has output this.
3.When shutting down, the controlled components return an exit code. If the code differs from 101, 102, or 103, the configuration daemon restarts this component. Thus, abnormal the termination of a component triggers its restart and registration of an error message from stderr in the Dr.Web for UNIX Mail Servers log.
• is returned when the component cannot operate with the current license. The component will be restarted only after the modification of license parameters.
• is returned when the component cannot operate with the current configuration parameters. Dr.Web ConfigD will try to restart the component when the configuration parameters are modified.
•Code 103 is returned in case the components started by Dr.Web ConfigD upon request ( and ) have been idle for a long time. The period of time after which the component is to shut down is specified in its settings (IdleTimeLimit parameter).
•If the configuration parameters received from the configuration management daemon cannot be applied on the fly, the component exists with code 0 so that Dr.Web ConfigD restart it.
•If a component cannot connect to the configuration daemon or a communication protocol error occurs, the component outputs an appropriate message to stderr and exits with code 1.
4.Signal exchange is organized.
•Dr.Web ConfigD sends the SIGHUP signal to components in order that they apply the modified configuration parameters.
•Dr.Web ConfigD sends the SIGTERM signal to the components so that they shut down. After receiving the signal the component is to shut down in 30 seconds.
•If a component does not shut down in 30 seconds, Dr.Web ConfigD sends the SIGKILL signal to shut it down forcibly.