# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/misc/snort/snort.conf # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at https://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- if [ $prefix_auto = 1 ] ; then prefix=opt/snort set_confopt fi #No clean install dir checks in ROCK yet. # postgresql support pkginstalled postgresql && var_append extraconfopt " " "--with-postgresql=/opt/postgresql" # mysql support pkginstalled mysql && var_append extraconfopt " " "--with-mysql=/opt/mysql" # FlexResp feature # NOTE: At time of writing, FlexResp: # (a) is considered in Alpha stage and "to be used with caution" # (b) requires libnet, which is an unmaintained package in ROCK # (c) does not work with libnet 1.1 (the latest stable release) # (d) works only with libnet 1.02a, which is deprecated # For these reasons, FlexResp is not enabled. # var_append extraconfopt " " "--enable-flexresp" snort_premake() { # Comply with FHS for /var/opt/ sed -i 's/\/var\/log\/snort/\/var\/opt\/snort\/log/' src/snort.h } snort_postmake() { # 'make install' sadly doesn't copy a lot of useful stuff # so we have to do it ourselves # The contrib directory contains helper scripts and tars # of plugins. This directory is just copied over. cp -fr contrib $docdir # The etc directory includes snort.conf, sigs, maps and rules. # Technically the maps should not be here but snort convention # places them in etc. # For security reasons this directory should not be world-readable mkdir -p $root/$prefix/var mkdir -p $root/$prefix/etc cp -fr etc/* $root/$prefix/etc/ cp -fr rules $root/$prefix/etc/ sed -i 's/\.\.\/rules/.\/rules/' $root/$prefix/etc/snort.conf # Create a SysV init script for snort install_init snort $confdir/snort.init } hook_add premake 3 snort_premake hook_add postmake 3 snort_postmake