Samhain | ||
---|---|---|
<<< Previous | Usage | Next >>> |
![]() | NOTE |
---|---|
This overview assumes that the file signature database is already initialized (see the Section called Basic usage instructions in the chapter called Configuration — samhain, the file monitor>). |
On startup, samhain or yule will:
If samhain is used as SUID application (note that SUID usage is neither necessary nor recommended): set the effective user to some compiled-in default (e.g. nobody).
Parse the command line. Options given on the command line will override those in the configuration file.
Check whether the path to the configuration file is trusted (see the Section called Trusted users and trusted paths in the chapter called Installation>), determine the checksum -- or verify the signature -- of the configuration file, then read in from it:
A list of files and directories to monitor, together with the specification of the policies that should be applied, i.e. what kind of modifications will be allowed or not. Wildcard patterns are supported.
Instructions regarding the logging facilities to be used.
Settings for the monitoring of login/logout events.
Miscellaneous other settings, as described in the appendix.
Obtain the local hostname, and information on the real and effective user. Initialize according to the specified options (e.g. disconnect from the parent process to become a daemon).
samhain: Determine the checksum -- or verify the GnuPG signature -- of the file database.
yule: Drop root privileges. Chroot if requested.
Issue a startup message including user, time, and information on checksums -- or signature keys -- of configuration file and database.
samhain: Enter a loop to check the files specified in the configuration file against the database at regular intervals as defined in the configuration file.
yule: Enter a loop to wait for connections from clients.
samhain: If not running as daemon, exit after the first loop, else, exit on SIGTERM or SIGQUIT (see the Section called Signals>).
yule: Exit on SIGTERM or SIGQUIT (see the Section called Signals>).
Issue an exit message including time and reason for exit.
<<< Previous | Home | Next >>> |
Usage | Up | Controlling the daemon |