Operating Principles

The configuration daemon Dr.Web ConfigD always runs as root. It starts other Dr.Web for UNIX Mail Servers components and interacts with them via a preliminarily open socket. The configuration daemon can accept connections from other components of the Dr.Web for UNIX Mail Servers via an information socket (accessible to all components) and via a managing socket (accessible only to the components running as root). It loads configuration parameters and license information from files or from a centralized protection server via the agent Dr.Web ES Agent and sets valid default values of the configuration parameters. By the time 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 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 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 license information from Dr.Web ConfigD. Only these parameters are used by the components in their further operation.

2.The daemon 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 written to the unified log of Dr.Web for UNIX Mail Servers 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 or 103, the configuration daemon will restart such component and the corresponding message from stderr will be written to the Dr.Web for UNIX Mail Servers 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. Dr.Web ConfigD will try to restart the component after the configuration parameters were modified.

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 period of time after which the component should be shut down with error code 103 is specified in its settings (the IdleTimeLimit parameter).

If the configuration parameters received from Dr.Web ConfigD cannot be applied on the fly, the component exits with code 0 so that Dr.Web ConfigD would 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 so that it would apply the modified configuration parameters.

Dr.Web ConfigD sends the SIGTERM signal to the component so that it would shut down. After receiving the signal the component is to shut down in 30 seconds.

If the component does not shut down in 30 seconds, Dr.Web ConfigD sends a SIGKILL signal to force it to shut down.