Operating Principles |
Main Functions 1.Starts and stops the product’s components depending on the settings. Automatically restarts components if a failure in their operation occurs. Starts components at the request of other components. Informs active components when another component starts or shuts down. 2.Provides for a centralized access of all components to configuration settings. Provides special components with interface for centralized management of configuration parameters. Notifies all required components about changes in configuration. 3.Provides components with information from the used license key file. Receives new license information from special components. Notifies running components on changes in license data or in configuration parameters. The configuration daemon Dr.Web ConfigD is always started with root privileges. It launches other components of Dr.Web for UNIX File Servers and communicates with them via a preliminarily open socket. The configuration daemon receives connections from other components via an information socket (publicly available) and a management socket (available only for components with superuser privileges). Loads configuration parameters and license data from files or delivers them from the used central protection server via the Dr.Web ES Agent, as well as substitutes default correct values for configuration parameters. Thus, by the moment when any component starts or SIGHUP signal is sent, the configuration daemon has an integral and consistent set of parameters for Dr.Web for UNIX File Servers. Upon receipt of SIGHUP signal, the configuration management daemon rereads configuration parameters and license data. If required, the daemon sends all components notifications instructing them to reread their configuration. Upon receipt of SIGTERM signal, the daemon shuts all components down and only after that finishes its own operation. The daemon also removes all temporary files of components after they are shut down. Communication Principles 1.All components use only configuration parameters and license data received from the configuration daemon Dr.Web ConfigD on their startup. 2.The daemon collects messages from all the controlled components into an integrated log. All information output by a component to the error stream stderr is collected by the daemon and written to the integrated log of the product 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 termination of a component triggers its restart and registration of an error message from stderr in the product’s log. •If a component exits with code 101, the component will be started again only after license parameters are changed. Thus, if a component cannot operate because of license restriction, it terminates its operation and outputs code 101 to stderr. •If a component exits with code 102, the component will be started again only after configuration parameters change. Thus, if a component cannot operate because of its configuration, it terminates its operation and outputs code 102 to stderr. The configuration daemon will attempt to start the component again only after any parameters are changed. •Components started by the configuration daemon at request can terminate their operation when idle and output code 103. It is such components as Dr.Web Scanning Engine and Dr.Web File Checker. •If new parameter values received by the component from the configuration daemon cannot be applied "on the fly", that is, if the restart is required, the component exits with code 0. If so, Dr.Web ConfigD restarts the component. •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: •The configuration daemon sends the component SIGHUP signal, which instructs to change parameters of configuration. •The configuration daemon sends the component SIGTERM signal, which instructs the component to terminate operation in 30 seconds. •SIGKILL signal is sent by theconfiguration daemon to trigger force termination of components which failed to shut down within 30 seconds after they received a SIGTERM signal. |