samhain: disable SUID/SGID checks
[mirror/dsa-puppet.git] / modules / samhain / templates / samhainrc.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 #####################################################################
7 #
8 # Configuration file template for samhain.
9 #
10 #####################################################################
11
12 # -- empty lines and lines starting with '#', ';' or '//' are ignored
13 # -- boolean options can be Yes/No or True/False or 1/0 
14 # -- you can PGP clearsign this file -- samhain will check (if compiled
15 #    with support) or otherwise ignore the signature
16 # -- CHECK mail address
17 #
18 # To each log facility, you can assign a threshold severity. Only
19 # reports with at least the threshold severity will be logged
20 # to the respective facility (even further below).
21 #
22 #####################################################################
23 #
24 # SETUP for file system checking:
25
26 # (i)   There are several policies, each has its own section. Put files
27 #       into the section for the appropriate policy (see below).
28 # (ii)  Section [EventSeverity]: 
29 #       To each policy, you can assign a severity (further below).
30 # (iii) Section [Log]: 
31 #       To each log facility, you can assign a threshold severity. Only
32 #       reports with at least the threshold severity will be logged
33 #       to the respective facility (even further below).
34 #
35 #####################################################################
36
37 #####################################################################
38 #
39 # Files are defined with: file = /absolute/path
40 #
41 # Directories are defined with:                  dir = /absolute/path
42 # or with an optional recursion depth (N <= 99): dir = N/absolute/path
43 #
44 # Directory inodes are checked. If you only want to check files
45 # in a directory, but not the directory inode itself, use (e.g.):
46 #
47 # [ReadOnly]
48 # dir = /some/directory
49 # [IgnoreAll]
50 # file = /some/directory
51 #
52 # You can use shell-style globbing patterns, like: file = /path/foo*
53
54 ######################################################################
55
56 [Misc]
57 ##
58 ## Add or subtract tests from the policies
59 ## - if you want to change their definitions,
60 ##   you need to do that before using the policies
61 ##
62 # RedefReadOnly = (no default)
63 # RedefAttributes=(no default)
64 # RedefLogFiles=(no default)
65 # RedefGrowingLogFiles=(no default)
66 # RedefIgnoreAll=(no default)
67 # RedefIgnoreNone=(no default)
68 # RedefUser0=(no default)
69 # RedefUser1=(no default)
70 IgnoreMissing=/etc/lvm/archive/.*.vg
71
72 [Attributes]
73 ##
74 ## for these files, only changes in permissions and ownership are checked
75 ##
76 file=/etc/mtab
77 file=/etc/ssh_random_seed
78 file=/etc/asound.conf
79 file=/etc/bacula/bacula-fd.conf
80 file=/etc/localtime
81 file=/etc/ioctl.save
82 file=/etc/passwd.backup
83 file=/etc/shadow.backup
84 file=/etc/postfix/prng_exch
85 file=/etc/adjtime
86 file=/etc/lvm/.cache
87 file=/etc/lvm/cache
88 file=/etc/lvm/cache/.cache
89 file=/etc/network/run/ifstate
90 file=/var/state/samhain/samhain_file
91 file=/etc/bind/zones/db.debian.net
92 file=/etc/exim4/bsmtp
93 file=/etc/fake-hwclock.data
94 <% if classes.include?("named::geodns") -%>
95 file=/etc/bind
96 file=/etc/bind/named.conf.acl
97 file=/etc/bind/named.conf.local
98 file=/etc/bind/geodns/named.conf.geo
99 file=/etc/bind/geodns/recvconf.files
100 <% end -%>
101 <% if classes.include?("named") -%>
102 file=/etc/bind/named.conf.options
103 <% end -%>
104 file=/etc/apache2/conf.d/puppet-builddlist
105 <% if classes.include?("roles::static_mirror") -%>
106 file=/etc/apache2/sites-available/static-vhosts-simple
107 file=/etc/static-clients.conf
108 <% elsif classes.include?("roles::static_master") -%>
109 file=/etc/static-clients.conf
110 <% elsif classes.include?("roles::static_source") -%>
111 file=/etc/static-clients.conf
112 <% end -%>
113 <% if classes.include?("apache2") -%>
114 file=/etc/apache2/conf-available/puppet-ssl-key-pins.conf
115 <% end -%>
116 file=/etc/multipath/wwids
117
118 #
119 # There are files in /etc that might change, thus changing the directory
120 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
121 #
122 file=/etc
123 file=/etc/ssh
124 file=/etc/network/run
125 file=/etc/bind/zones
126 file=/etc/spamassassin/sa-update-keys
127 file=/etc/init.d/.depend.boot
128 file=/etc/init.d/.depend.start
129 file=/etc/init.d/.depend.stop
130
131 # These are the directories for the files we handle with puppet
132 <% if classes.include?("apache2") -%>
133 file=/etc/apache2/conf-available
134 files=/etc/apache2/mods-enabled
135 files=/etc/apache2/sites-available
136 <% end -%>
137 file=/etc/bacula
138 file=/etc/samhain
139 file=/etc/munin
140 file=/etc/munin/plugins
141 file=/etc/munin/plugin-conf.d
142 file=/etc/munin/munin-conf.d
143 file=/etc/exim4
144 file=/etc/exim4/ssl
145 file=/etc/apt
146 file=/etc/apt/apt.conf.d
147 file=/etc/apt/sources.list.d
148 file=/etc/apt/preferences.d
149 file=/etc/default
150 file=/etc/logrotate.d
151 file=/etc/nagios
152 file=/etc/nagios/nrpe.d
153 file=/etc/nagios/obsolete-packages-ignore.d
154 file=/etc/bind/geodns
155 <% if scope.function_has_role(['nagiosmaster']) -%>
156 file=/etc/nagios3/puppetconf.d
157 <% end -%>
158 file=/etc/puppet
159 file=/etc/cron.d
160 file=/etc/cron.weekly
161 file=/usr/lib/nagios/plugins
162 file=/usr/sbin
163 file=/etc/monit
164 file=/etc/monit/monit.d
165 file=/etc/pam.d
166 file=/etc/schroot/default
167 file=/etc/schroot/setup.d
168 file=/etc/sysctl.d
169 file=/etc/syslog-ng
170 file=/etc/stunnel
171 file=/etc/ferm/
172 file=/etc/ferm/conf.d
173 file=/etc/ferm/dsa.d
174 file=/etc/rc.local
175 file=/etc/unbound
176 file=/etc/dsa
177 file=/etc/rabbitmq
178 <% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or scope.function_has_role(['static_master']) -%>
179 file=/etc/ssh/userkeys
180 file=/etc/ssh/userkeys/staticsync
181 <% end -%>
182 file=/etc/rsyncd
183 <%- if @hostname == "sibelius" then -%>
184 file=/etc/tsm
185 file=/etc/tsm/TSM.PWD
186 <% end -%>
187 file=/etc/ssl/private
188
189
190 [LogFiles]
191 ##
192 ## for these files, changes in signature, timestamps, and size are ignored 
193 ##
194 file=/etc/motd
195
196 # is on tmpfs, ignore.
197 #file=/var/run/utmp
198
199
200 #####################################################################
201 #
202 # This would be the proper syntax for parts that should only be
203 #    included for certain hosts.
204 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
205 #    result still has the proper syntax for the config file.
206 # You may have any number of @HOSTNAME/@end brackets.
207 # HOSTNAME should be the fully qualified 'official' name 
208 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
209 #    No IP number - except if samhain cannot determine the 
210 #    fully qualified hostname.
211 #
212 # @HOSTNAME
213 # file=/foo/bar
214 # @end
215 #
216 # These are two examples for conditional inclusion/exclusion
217 # of a machine based on the output from 'uname -srm'
218 #
219 # $Linux:2.*.7:i666
220 # file=/foo/bar3
221 # $end
222 #
223 # !$Linux:2.*.7:i686
224 # file=/foo/bar2
225 # $end
226 #
227 #####################################################################
228
229 [GrowingLogFiles]
230 ##
231 ## for these files, changes in signature, timestamps, and increase in size
232 ##                  are ignored 
233 ##
234 file=/var/log/warn
235 file=/var/log/messages
236 file=/var/log/wtmp
237 file=/var/log/faillog
238 file=/var/log/auth.log
239 file=/var/log/daemon.log
240 file=/var/log/user.log
241 file=/var/log/kern.log
242 file=/var/log/syslog
243
244
245 [IgnoreAll]
246 dir=-1/srv
247 ##
248 ## for these files, no modifications are reported
249 ##
250 ## This file might be created or removed by the system sometimes.
251 ##
252 file=/etc/resolv.conf
253 <% if scope.lookupvar('site::nodeinfo')['buildd'] -%>
254 file=/etc/dupload.conf
255 file=/etc/buildd/buildd.conf
256 file=/etc/sbuild/sbuild.conf
257 <% end -%>
258 file=/etc/resolv.conf.pcmcia.save
259 file=/etc/nologin
260 file=/etc/postfix/debian.db
261 file=/etc/postfix/debian
262 file=/etc/ssh/ssh_known_hosts
263 file=/etc/ssh/ssh-rsa-shadow
264 file=/var/lib/misc/ssh-rsa-shadow
265 file=/etc/.da-backup.trace
266 file=/etc/postfix/debianhosts
267 file=/etc/postfix/debianhosts.db
268 file=/etc/blkid.tab
269 file=/etc/blkid.tab.old
270 file=/etc/resolv.conf.dhclient-new
271
272 # We handle these files with puppet - please to not be bothering us
273 file=/etc/dsa/pubsub.conf
274 file=/etc/nsswitch.conf
275 file=/etc/timezone
276 file=/etc/motd.tail
277 file=/etc/update-motd.d/
278 file=/etc/update-motd.d/puppet-motd
279 file=/etc/ntp.conf
280 file=/etc/samhain/samhainrc
281 file=/etc/munin/munin-node.conf
282 file=/etc/munin/plugin-conf.d/munin-node
283 dir=2/etc/munin/munin-conf.d
284 file=/etc/userdir-ldap.confc
285 file=/etc/exim4/blacklist
286 file=/etc/exim4/host_blacklist
287 file=/etc/exim4/callout_users
288 file=/etc/exim4/exim4.conf
289 file=/etc/exim4/grey_users
290 file=/etc/exim4/helo-check
291 file=/etc/exim4/locals
292 file=/etc/exim4/localusers
293 file=/etc/exim4/manualroute
294 file=/etc/exim4/rbllist
295 file=/etc/exim4/rhsbllist
296 file=/etc/exim4/submission-domains
297 file=/etc/exim4/virtualdomains
298 file=/etc/exim4/email-virtualdomains
299 file=/etc/exim4/whitelist
300 file=/etc/exim4/local-settings.conf
301 file=/etc/exim4/ssl/ca.crt
302 file=/etc/exim4/ssl/ca.crl
303 file=/etc/exim4/ssl/thishost.crt
304 file=/etc/exim4/ssl/thishost.key
305 dir=3/etc/exim4/email-virtualdomains
306 file=/etc/ssh/ssh_config
307 file=/etc/ssh/sshd_config
308 file=/etc/dsa/cron.ignore.dsa-puppet-stuff
309 file=/etc/vsftpd.conf
310 file=/etc/aliases
311 file=/etc/multipath.conf
312 file=/etc/static-components.conf
313 file=/etc/rabbitmq/rabbitmq.config
314 file=/etc/rabbitmq/enabled_plugins
315 dir=/etc/bacula/storages-list.d
316 dir=/etc/bacula/storage-conf.d
317 dir=/etc/bacula/conf.d
318 <%=
319 out=""
320 if scope.lookupvar('site::nodeinfo')['heavy_exim']
321   out = '
322 file=/etc/exim4/surbl_whitelist.txt
323 file=/etc/exim4/exim_surbl.pl
324 file=/etc/exim4/ccTLD.txt
325 file=/etc/clamav-unofficial-sigs.conf
326 file=/etc/clamav-unofficial-sigs.dsa.conf
327 '
328 end
329 out
330 %>
331 file=/etc/munin/plugins/bind
332 file=/etc/munin/plugins/bind_views
333 file=/etc/munin/plugins/cpu
334 file=/etc/munin/plugins/df
335 file=/etc/munin/plugins/df_abs
336 file=/etc/munin/plugins/df_inode
337 file=/etc/munin/plugins/entropy
338 file=/etc/munin/plugins/forks
339 file=/etc/munin/plugins/interrupts
340 file=/etc/munin/plugins/iostat
341 file=/etc/munin/plugins/irqstats
342 file=/etc/munin/plugins/load
343 file=/etc/munin/plugins/memory
344 file=/etc/munin/plugins/ntp_offset
345 file=/etc/munin/plugins/ntp_states
346 file=/etc/munin/plugins/open_files
347 file=/etc/munin/plugins/open_inodes
348 file=/etc/munin/plugins/processes
349 file=/etc/munin/plugins/ps_apache2
350 file=/etc/munin/plugins/ps_exim4
351 file=/etc/munin/plugins/ps_vsftpd
352 file=/etc/munin/plugins/spamassassin
353 file=/etc/munin/plugins/swap
354 file=/etc/munin/plugins/uptime
355 file=/etc/munin/plugins/vmstat
356 file=/etc/munin/plugins/vfstpd
357 file=/etc/munin/plugins/apache_accesses
358 file=/etc/munin/plugins/apache_processes
359 file=/etc/munin/plugins/apache_volume
360 file=/etc/munin/plugins/apache_servers
361 file=/etc/munin/plugins/exim_mailqueue
362 file=/etc/munin/plugins/exim_mailstats
363 file=/etc/munin/plugins/postfix_mailqueue
364 file=/etc/munin/plugins/postfix_mailvolume
365 file=/etc/apache2/conf.d/resource-limits
366 file=/etc/apache2/mods-enabled/info.conf
367 file=/etc/apache2/mods-enabled/info.load
368 file=/etc/apache2/mods-enabled/server.conf
369 file=/etc/apache2/mods-enabled/server.load
370 file=/etc/apache2/conf.d/server-status
371 file=/etc/apache2/conf.d/local-serverinfo
372 file=/etc/apache2/sites-available/www.debian.org
373 file=/etc/apt/preferences
374 file=/etc/apt/sources.list.d/volatile.list
375 file=/etc/apt/sources.list.d/security.list
376 file=/etc/apt/sources.list.d/buildd.list
377 file=/etc/apt/sources.list.d/buildd.debian.org.list
378 file=/etc/apt/sources.list.d/buildd.debian.org-proposed.list
379 file=/etc/apt/sources.list.d/buildd.debian.org-experimental.list
380 file=/etc/apt/sources.list.d/geoip.list
381 file=/etc/apt/sources.list.d/backports.debian.org.list
382 file=/etc/apt/sources.list.d/debian.org.list
383 file=/etc/apt/sources.list.d/db.debian.org.list
384 file=/etc/apt/sources.list.d/debian.restricted.list
385 file=/etc/apt/sources.list.d/debian.list
386 file=/etc/apt/sources.list.d/backports.org.list
387 file=/etc/apt/apt.conf.d/local-compression
388 file=/etc/apt/apt.conf.d/local-recommends
389 file=/etc/apt/apt.conf.d/local-pdiffs
390 file=/etc/apt/apt.conf.d/local-ssl-ca-global
391 file=/etc/apt/preferences.d/buildd
392 file=/etc/puppet/puppet.conf
393 file=/etc/default/puppet
394 file=/etc/default/postgrey
395 file=/etc/default/syslog-ng
396 file=/etc/logrotate.d/exim4-paniclog
397 file=/etc/logrotate.d/exim4-base
398 file=/etc/logrotate.d/syslog-ng
399 file=/etc/syslog-ng/syslog-ng.conf
400 file=/usr/sbin/dsa-update-apt-status
401 file=/usr/sbin/dsa-update-samhain-status
402 file=/etc/nagios/nrpe.d/nrpe_dsa.cfg
403 file=/etc/nagios/nrpe.d/debianorg.cfg
404 file=/etc/nagios/obsolete-packages-ignore
405 file=/etc/nagios/obsolete-packages-ignore.d/hostspecific
406 file=/etc/nagios/check-libs.conf
407 file=/usr/lib/nagios/plugins/dsa-check-packages
408 file=/usr/lib/nagios/plugins/dsa-check-soas
409 file=/usr/lib/nagios/plugins/dsa-check-mirrorsync
410 file=/usr/lib/nagios/plugins/dsa-check-samhain
411 file=/usr/lib/nagios/plugins/dsa-check-statusfile
412 file=/usr/lib/nagios/plugins/dsa-check-dabackup-server
413 file=/usr/lib/nagios/plugins/dsa-check-config
414 file=/usr/lib/nagios/plugins/dsa-check-hpacucli
415 file=/usr/lib/nagios/plugins/dsa-check-raid-mpt
416 file=/usr/lib/nagios/plugins/dsa-check-puppet
417 file=/usr/lib/nagios/plugins/dsa-check-running-kernel
418 file=/usr/lib/nagios/plugins/dsa-check-raid-3ware
419 file=/usr/lib/nagios/plugins/dsa-check-dabackup
420 file=/usr/lib/nagios/plugins/dsa-check-raid-dac960
421 file=/usr/lib/nagios/plugins/dsa-check-udldap-freshness
422 file=/usr/lib/nagios/plugins/dsa-check-raid-areca
423 file=/usr/lib/nagios/plugins/dsa-check-raid-sw
424 file=/usr/lib/nagios/plugins/dsa-update-samhain-status
425 file=/etc/sudoers
426 file=/etc/stunnel/puppet-ekeyd-peer.pem
427 file=/etc/stunnel/puppet-ekeyd.conf
428 file=/etc/pam.d/sudo
429 file=/etc/monit/monitrc
430 file=/etc/monit/monit.d/01puppet
431 file=/etc/monit/monit.d/00debian.org
432 file=/etc/cron.d/dsa-puppet-stuff
433 file=/etc/cron.d/dsa-buildd
434 file=/etc/cron.d/puppet-nagios-wraps
435 file=/etc/cron.weekly/stunnel-ekey-restart
436 file=/etc/default/schroot
437 file=/etc/schroot/default/nssdatabases
438 file=/etc/schroot/setup.d/99builddsourceslist
439 file=/etc/schroot/setup.d/99porterbox-extra-sources
440 file=/etc/schroot/setup.d/99porterbox-extra-apt-options
441 file=/etc/openvswitch/conf.db
442
443 <% if scope.function_has_role(['nagiosmaster']) -%>
444 file=/etc/nagios3/puppetconf.d/auto-hostgroups.cfg
445 file=/etc/nagios3/puppetconf.d/auto-hosts.cfg
446 file=/etc/nagios3/puppetconf.d/auto-services.cfg
447 file=/etc/nagios3/puppetconf.d/auto-dependencies.cfg
448 file=/etc/nagios3/puppetconf.d/auto-hostextinfo.cfg
449 file=/etc/nagios3/puppetconf.d/auto-serviceextinfo.cfg
450 file=/etc/nagios3/puppetconf.d/auto-servicegroups.cfg
451 file=/etc/nagios3/puppetconf.d/contacts.cfg
452 <% end -%>
453 <% if scope.function_has_role(['muninmaster']) -%>
454 file=/etc/munin/munin.conf
455 <% end -%>
456 <% if scope.function_has_role(['puppetmaster']) -%>
457 dir=8/etc/puppet
458 <% end -%>  
459 <% if classes.include?('named::geodns') -%>
460 dir=1/etc/bind/geodns
461 <% end -%>
462 <% if classes.include?('named::authoritative') -%>
463 dir=1/etc/bind
464 file=/etc/bind/named.conf.debian-zones
465 <% end -%>
466 dir=3/etc/lvm/archive
467 dir=3/etc/lvm/backup
468 dir=1/etc/ferm/dsa.d
469 dir=1/etc/ferm/conf.d
470 dir=3/etc/facter
471 file=/etc/ferm/conf.d/me.conf
472 file=/etc/ferm/conf.d/defs.conf
473 file=/etc/ferm/ferm.conf
474 file=/etc/ssl/README
475 dir=2/etc/ssl/debian
476 dir=1/etc/ssl/certs
477 dir=1/etc/ssl/ca-debian
478 dir=1/etc/ssl/ca-global
479 file=/etc/ca-certificates.conf
480 file=/etc/ca-certificates-debian.conf
481 file=/etc/ca-certificates-global.conf
482 file=/etc/ssl/private/ssl-cert-snakeoil.key
483 file=/etc/unbound/unbound.conf
484 <% if scope.lookupvar('::fqdn') == "draghi.debian.org" -%>
485 file=/etc/openvpn/deb-mgmt-clients.pool
486 <% end -%>
487 file=/etc/rsyncd/debian.secrets
488
489
490 <% if scope.function_has_role(['puppetmaster']) %>
491
492 # Damn you rails apps and your shoddy packaging
493 file=/usr/share/puppet-dashboard/public/stylesheets
494 file=/usr/share/puppet-dashboard/public/javascripts
495 file=/usr/share/puppet-dashboard/public/stylesheets/all.css
496 file=/usr/share/puppet-dashboard/public/javascripts/all.js
497 dir=1/usr/share/puppet-dashboard/tmp/pids
498 <% end -%>
499
500 <% if classes.include?("porterbox") %>
501 file=/etc/cron.weekly/puppet-mail-big-homedirs
502 <% end -%>
503 file=/etc/ssl/private/*.key-certchain
504
505 [IgnoreNone]
506 ##
507 ## for these files, all modifications (even access time) are reported
508 ##    - you may create some interesting-looking file (like /etc/safe_passwd),
509 ##      just to watch whether someone will access it ...
510 ##
511
512 [Prelink]
513 ##
514 ## Use for prelinked files or directories holding them
515 ##
516
517
518 [ReadOnly]
519 ##
520 ## for these files, only access time is ignored
521 ##
522 dir=/usr/bin
523 dir=/bin
524 dir=/boot
525 #
526 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
527 # so we go 3 levels deep
528 #
529 dir=3/sbin
530 dir=/usr/sbin
531 dir=/lib
532 dir=3/usr/lib
533 dir=3/usr/share
534 #
535 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*, 
536 #        so we go 3 levels deep there too
537 #
538 dir=3/etc
539
540 # Various directories / files that may include / be SUID/SGID binaries
541 #
542 #
543 file=/usr/lib/pt_chown
544 # X11, in Debian X7 this is now a symlink
545 #dir=/usr/X11R6/bin
546 #dir=/usr/X11R6/lib/X11/xmcd/bin
547 # Apache:
548 #file=/usr/lib/apache/suexec
549 #file=/usr/lib/apache/suexec.disabled
550 # Extra directories:
551 #dir=/opt/gnome/bin
552 #dir=/opt/kde/bin
553
554 [User0]
555 [User1]
556 ## User0 and User1 are sections for files/dirs with user-definable checking
557 ## (see the manual) 
558
559
560 [EventSeverity]
561 ##
562 ## Here you can assign severities to policy violations.
563 ## If this severity exceeds the treshold of a log facility (see below),
564 ## a policy violation will be logged to that facility.
565 ##
566 ## Severity for verification failures.
567 ##
568 # SeverityReadOnly=crit
569 # SeverityLogFiles=crit
570 # SeverityGrowingLogs=crit
571 # SeverityIgnoreNone=crit
572 # SeverityAttributes=crit
573 # SeverityUser0=crit
574 # SeverityUser1=crit
575
576 # Default behaviour
577 SeverityReadOnly=crit
578 SeverityLogFiles=crit
579 SeverityGrowingLogs=warn
580 SeverityIgnoreNone=crit
581 SeverityAttributes=crit
582
583
584 ##
585 ## We have a file in IgnoreAll that might or might not be present.
586 ## Setting the severity to 'info' prevents messages about deleted/new file.
587 ##
588 # SeverityIgnoreAll=crit
589 SeverityIgnoreAll=info
590
591 ## Files : file access problems
592 # SeverityFiles=crit
593
594 ## Dirs  : directory access problems
595 # SeverityDirs=crit
596
597 ## Names : suspect (non-printable) characters in a pathname
598 # SeverityNames=crit
599
600 # Default behaviour
601 SeverityFiles=crit
602 SeverityDirs=crit
603 SeverityNames=warn
604
605
606 [Log]
607 ##
608 ## Switch on/OFF log facilities and set their threshold severity
609 ##
610 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
611 ## 'mark' is used for timestamps.
612 ##
613 ##
614 ## Use 'none' to SWITCH OFF a log facility
615 ## 
616 ## By default, everything equal to and above the threshold is logged.
617 ## The specifiers '*', '!', and '=' are interpreted as  
618 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does, 
619 ## at least on Linux). Examples:
620 ## MailSeverity=*
621 ## MailSeverity=!warn
622 ## MailSeverity==crit
623
624 ## E-mail
625 ##
626 # MailSeverity=none
627
628 ## Console
629 ##
630 # PrintSeverity=info
631
632 ## Logfile
633 ##
634 # LogSeverity=mark
635
636 ## Syslog
637 ##
638 # SyslogSeverity=none
639
640 ## Remote server (yule)
641 ##
642 # ExportSeverity=none
643
644 ## External script or program
645 ##
646 # ExternalSeverity = none
647
648 ## Logging to a database
649 ##
650 # DatabaseSeverity = none
651
652 # Default behaviour
653 MailSeverity=crit
654 PrintSeverity=none
655 LogSeverity=info
656 SyslogSeverity=alert
657 #ExportSeverity=none
658
659
660
661
662
663 #####################################################
664 #
665 # Optional modules
666 #
667 #####################################################
668
669 [SuidCheck]
670 ##
671 ## --- Check the filesystem for SUID/SGID binaries
672 ## 
673
674 ## Switch off
675 #
676 SuidCheckActive = 0
677
678 ## Interval for check (seconds)
679 #
680 # SuidCheckInterval = 7200
681
682 ## Alternative: crontab-like schedule
683 #
684 # SuidCheckSchedule = NULL
685  
686 ## Directory to exclude 
687 #
688 # SuidCheckExclude = NULL
689
690 ## Limit on files per second (0 == no limit)
691 #
692 # SuidCheckFps = 0
693
694 ## Alternative: yield after every file
695 #
696 # SuidCheckYield = no
697
698 ## Severity of a detection
699 #
700 # SeveritySuidCheck = crit
701
702 ## Quarantine SUID/SGID files if found
703 #
704 # SuidCheckQuarantineFiles = yes
705
706 ## Method for Quarantining files:
707 #  0 - Delete or truncate the file.
708 #  1 - Remove SUID/SGID permissions from file.
709 #  2 - Move SUID/SGID file to quarantine dir.
710 #
711 # SuidCheckQuarantineMethod = 0
712
713 ## For method 1 and 3, really delete instead of truncating
714
715 # SuidCheckQuarantineDelete = yes
716
717 # [Kernel]
718 ##
719 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only) 
720 ##
721
722 ## Switch on/off
723 #
724 #KernelCheckActive = True
725
726 ## Check interval (seconds); btw., the check is VERY fast
727 #
728 # KernelCheckInterval = 300
729
730 ## Severity
731 #
732 # SeverityKernel = crit
733
734
735 # [Utmp]
736 ##
737 ## --- Logging of login/logout events
738 ##
739
740 ## Switch on/off
741 #
742 # LoginCheckActive = True
743
744 ## Severity for logins, multiple logins, logouts
745
746 # SeverityLogin=info
747 # SeverityLoginMulti=warn
748 # SeverityLogout=info
749
750 ## Interval for login/logout checks
751 #
752 # LoginCheckInterval = 300
753
754
755 # [Database]
756 ##
757 ## --- Logging to a relational database
758 ##
759
760 ## Database name
761 #
762 # SetDBName = samhain
763
764 ## Database table
765 #
766 # SetDBTable = log
767
768 ## Database user
769 #
770 # SetDBUser = samhain
771
772 ## Database password
773 #
774 # SetDBPassword = (default: none)
775
776 ## Database host
777 #
778 # SetDBHost = localhost
779
780 ## Log the server timestamp for received messages
781 #
782 # SetDBServerTstamp = True
783
784 ## Use a persistent connection
785 #
786 # UsePersistent = True
787
788 # [External]
789 ##
790 ## Interface to call external scripts/programs for logging
791 ##
792
793 ## The absolute path to the command
794 ## - Each invocation of this directive will end the definition of the
795 ##   preceding command, and start the definition of 
796 ##   an additional, new command
797 #
798 # OpenCommand = (no default)
799
800 ## Type (log or rv)
801 ## - log for log messages, srv for messages received by the server
802 #
803 # SetType = log
804
805 ## The command (full command line) to execute
806 #
807 # SetCommandLine = (no default)
808
809 ## The environment (KEY=value; repeat for more)
810 #
811 # SetEnviron = TZ=(your timezone)
812
813 ## The TIGER192 checksum (optional)
814 #
815 # SetChecksum = (no default)
816
817 ## User who runs the command
818 #
819 # SetCredentials = (default: samhain process uid)
820
821 ## Words not allowed in message
822 #
823 # SetFilterNot = (none)
824
825 ## Words required (ALL of them)
826 #
827 # SetFilterAnd = (none)
828
829 ## Words required (at least one)
830 #
831 # SetFilterOr = (none)
832
833 ## Deadtime between consecutive calls
834 #
835 # SetDeadtime = 0
836
837 ## Add default environment (HOME, PATH, SHELL)
838 #
839 # SetDefault = no
840
841 <% if scope.call_function('versioncmp', [@lsbmajdistrelease, '9']) >= 0 -%>
842 [PortCheck]
843 PortCheckActive=0
844 <% end -%>
845
846
847 #####################################################
848 #
849 # Miscellaneous configuration options
850 #
851 #####################################################
852
853 [Misc]
854
855 ## whether to become a daemon process
856 ## (this is not honoured on database initialisation)
857 #
858 # Daemon = no
859 Daemon = yes
860
861 ## whether to test signature of files (init/check/none)
862 ## - if 'none', then we have to decide this on the command line -
863 #
864 # ChecksumTest = none
865 ChecksumTest=check
866
867 ## whether to drop linux capabilities that are not required
868 ## - will make a root process a 'mere mortal' in many respects
869 #
870 # UseCaps = yes
871
872 ## Set nice level (-19 to 19, see 'man nice'),
873 ## and I/O limit (kilobytes per second; 0 == off)
874 ## to reduce load on host.
875 #
876 # SetNiceLevel = 0
877 # SetIOLimit = 0
878
879 ## The version string to embed in file signature databases
880 #
881 # VersionString = NULL
882
883 ## Interval between time stamp messages
884 #
885 # SetLoopTime = 60
886 SetLoopTime = 600
887
888 ## Interval between file checks 
889 #
890 # SetFileCheckTime = 600
891 SetFileCheckTime = 7200
892
893 ## Alternative: crontab-like schedule
894 #
895 # FileCheckScheduleOne = NULL
896
897 ## Alternative: crontab-like schedule(2)
898 #
899 # FileCheckScheduleTwo = NULL
900
901 ## Report only once on modified fles 
902 ## Setting this to 'FALSE' will generate a report for any policy 
903 ## violation (old and new ones) each time the daemon checks the file system.
904 #
905 # ReportOnlyOnce = True
906
907 ## Report in full detail
908 #
909 # ReportFullDetail = False
910
911 ## Report file timestamps in local time rather than GMT
912 #
913 # UseLocalTime = No
914
915 ## The console device (can also be a file or named pipe)
916 ## - There are two console devices. Accordingly, you can use
917 ##   this directive a second time to set the second console device.
918 ##   If you have not defined the second device at compile time,
919 ##   and you don't want to use it, then:
920 ##   setting it to /dev/null is less effective than just leaving
921 ##   it alone (setting to /dev/null will waste time by opening
922 ##   /dev/null and writing to it)
923 #
924 # SetConsole = /dev/console
925
926 ## Activate the SysV IPC message queue
927 #
928 # MessageQueueActive = False
929
930
931 ## If false, skip reverse lookup when connecting to a host known 
932 ## by name rather than IP address (i.e. trust the DNS)
933 #
934 # SetReverseLookup = True
935
936 ## --- E-Mail ---
937
938 # Only highest-level (alert) reports will be mailed immediately,
939 # others will be queued. Here you can define, when the queue will
940 # be flushed (Note: the queue is automatically flushed after
941 # completing a file check).
942 #
943 SetMailTime = 86400
944
945 ## Maximum number of mails to queue
946 #
947 SetMailNum = 10
948
949 ## Recipient (max. 8)
950 #
951 SetMailAddress=samhain-reports@<%= @fqdn -%>
952
953 SetMailRelay = localhost
954
955 ## Custom subject format
956 #
957 MailSubject = [Samhain at %H] %T: %S
958
959 ## --- end E-Mail ---
960
961 ## Path to the prelink executable
962 #
963 # SetPrelinkPath = /usr/sbin/prelink
964
965 ## TIGER192 checksum of the prelink executable
966 #
967 # SetPrelinkChecksum = (no default)
968
969
970 ## Path to the executable. If set, will be checksummed after startup
971 ## and before exit.
972 #
973 # SamhainPath = (no default)
974
975
976 ## The IP address of the log server
977 #
978 # SetLogServer = (default: compiled-in)
979
980 ## The IP address of the time server
981 #
982 # SetTimeServer = (default: compiled-in)
983
984 ## Trusted Users (comma delimited list of user names) 
985 #
986 # TrustedUser = (no default; this adds to the compiled-in list)
987
988 ## Path to the file signature database
989 #
990 # SetDatabasePath = (default: compiled-in)
991
992 ## Path to the log file
993 #
994 # SetLogfilePath = (default: compiled-in)
995
996 ## Path to the PID file
997 #
998 # SetLockPath = (default: compiled-in)
999
1000
1001 ## The digest/checksum/hash algorithm
1002 #
1003 # DigestAlgo = TIGER192
1004
1005
1006 ## Custom format for message header. 
1007 ## CAREFUL if you use XML logfile format.
1008 ##
1009 ## %S severity
1010 ## %T timestamp
1011 ## %C class
1012 ##
1013 ## %F source file
1014 ## %L source line
1015 #
1016 # MessageHeader="%S %T "
1017
1018
1019 ## Don't log path to config/database file on startup
1020 #
1021 # HideSetup = False
1022
1023 ## The syslog facility, if you log to syslog
1024 #
1025 # SyslogFacility = LOG_AUTHPRIV
1026 SyslogFacility=LOG_LOCAL2
1027
1028 ## The message authentication method
1029 ## - If you change this, you *must* change it
1030 ##   on client *and* server
1031 #
1032 # MACType = HMAC-TIGER
1033
1034
1035 ## everything below is ignored
1036 [EOF]
1037
1038 #####################################################################
1039 # This would be the proper syntax for parts that should only be
1040 #    included for certain hosts.
1041 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
1042 #    result still has the proper syntax for the config file.
1043 # You may have any number of @HOSTNAME/@end brackets.
1044 # HOSTNAME should be the fully qualified 'official' name 
1045 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
1046 #    No IP number - except if samhain cannot determine the 
1047 #    fully qualified hostname.
1048 #
1049 # @HOSTNAME
1050 # file=/foo/bar
1051 # @end
1052 #
1053 # These are two examples for conditional inclusion/exclusion
1054 # of a machine based on the output from 'uname -srm'
1055 # $Linux:2.*.7:i666
1056 # file=/foo/bar3
1057 # $end
1058 #
1059 # !$Linux:2.*.7:i686
1060 # file=/foo/bar2
1061 # $end
1062 #
1063 #####################################################################