samhain: disable SuidCheck for /srv/buildd/unpack on buildds
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 8 Apr 2017 16:57:59 +0000 (18:57 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 8 Apr 2017 17:02:57 +0000 (19:02 +0200)
The SuidCheck module was not available in jessie (despite our
configuration file mentioning it), and is now enabled by default in
stretch.

For the build daemons, we need to disable suid checks in
/srv/buildd/unpack.

For the porterboxes, we need to disable suid checks in
/srv/chroot/schroot-unpack.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
modules/samhain/templates/samhainrc.erb

index 6f46ae5..b737307 100644 (file)
@@ -665,7 +665,7 @@ SyslogSeverity=alert
 #
 #####################################################
 
-[SuidCheck]
+[SuidCheck]
 ##
 ## --- Check the filesystem for SUID/SGID binaries
 ## 
@@ -684,7 +684,13 @@ SyslogSeverity=alert
  
 ## Directory to exclude 
 #
+<% if scope.lookupvar('site::nodeinfo')['buildd'] -%>
+SuidCheckExclude = /srv/buildd/unpack
+<% elsif scope.lookupvar('site::nodeinfo')['porterbox'] -%>
+SuidCheckExclude = /srv/chroot/schroot-unpack
+<% else -%>
 # SuidCheckExclude = NULL
+<% end -%>
 
 ## Limit on files per second (0 == no limit)
 #