aboutsummaryrefslogtreecommitdiff
path: root/security/snortsam/files
diff options
context:
space:
mode:
authorJean Milanez Melo <jmelo@FreeBSD.org>2008-09-03 23:02:16 +0000
committerJean Milanez Melo <jmelo@FreeBSD.org>2008-09-03 23:02:16 +0000
commit207434802b7a737d7f66780757ab87c8e6414bc5 (patch)
tree76381db115de5294ac1246759057184d22ed1ea8 /security/snortsam/files
parent7adf47f0c94f4e9d1befc4e29a56b0bc279ebdab (diff)
downloadports-207434802b7a737d7f66780757ab87c8e6414bc5.tar.gz
ports-207434802b7a737d7f66780757ab87c8e6414bc5.zip
New port: security/snortsam
SnortSam is a plugin for Snort, an open-source light-weight Intrusion Detection System (IDS). The plugin allows for automated blocking of IP addresses on many firewalls. WWW: http://www.snortsam.net PR: ports/126896 Submitted by: Danton Dorati <danton@freebsdbrasil.com.br>
Notes
Notes: svn path=/head/; revision=219799
Diffstat (limited to 'security/snortsam/files')
-rw-r--r--security/snortsam/files/patch-makesnortsam.sh13
-rw-r--r--security/snortsam/files/patch-snortsam.h16
-rw-r--r--security/snortsam/files/pkg-message-snortsam10
-rw-r--r--security/snortsam/files/snortsam.sh.in33
4 files changed, 72 insertions, 0 deletions
diff --git a/security/snortsam/files/patch-makesnortsam.sh b/security/snortsam/files/patch-makesnortsam.sh
new file mode 100644
index 000000000000..4143c536ead9
--- /dev/null
+++ b/security/snortsam/files/patch-makesnortsam.sh
@@ -0,0 +1,13 @@
+--- makesnortsam.sh.old 2008-08-03 00:04:24.000000000 -0300
++++ makesnortsam.sh 2008-08-03 00:04:57.000000000 -0300
+@@ -11,8 +11,8 @@
+ # Under Solaris, the OPSEC stuff is linked dynamically.
+ # On other platforms, statically.
+
+-BSDTHREADLIB='-lc_r'
+-#BSDTHREADLIB='-lpthread'
++#BSDTHREADLIB='-lc_r'
++BSDTHREADLIB='-lpthread'
+
+ systype=`uname`
+
diff --git a/security/snortsam/files/patch-snortsam.h b/security/snortsam/files/patch-snortsam.h
new file mode 100644
index 000000000000..ab32bb001eaf
--- /dev/null
+++ b/security/snortsam/files/patch-snortsam.h
@@ -0,0 +1,16 @@
+--- src/snortsam.h.old 2008-08-03 00:08:34.000000000 -0300
++++ src/snortsam.h 2008-08-03 00:10:58.000000000 -0300
+@@ -178,10 +178,10 @@
+ #define safecopy(dst,src) _safecp(dst,sizeof(dst),src)
+
+ #ifdef WIN32
+-#define FWSAMCONFIGFILE "snortsam.cfg"
+-#define FWSAMHISTORYFILE "snortsam.sta"
++#define FWSAMCONFIGFILE "/usr/local/etc/snortsam.cfg"
++#define FWSAMHISTORYFILE "/var/db/snortsam.sta"
+ #else
+-#define FWSAMCONFIGFILE "/etc/snortsam.conf"
++#define FWSAMCONFIGFILE "/usr/local/etc/snortsam.conf"
+ #define FWSAMHISTORYFILE "/var/db/snortsam.state"
+ #endif
+
diff --git a/security/snortsam/files/pkg-message-snortsam b/security/snortsam/files/pkg-message-snortsam
new file mode 100644
index 000000000000..504ed78649d7
--- /dev/null
+++ b/security/snortsam/files/pkg-message-snortsam
@@ -0,0 +1,10 @@
+
+============================================================
+NOTE: Make sure that your SNORT installation it is defined
+ output plugin SNORTSAM for don't cause errors while
+ building SNORTSAM system. If exists some OLD SNORT
+ installation WITHOUT supports for interaction between
+ SNORT and SNORTSAM. PLEASE reconfigure WITH that this
+ feature and rebuild a new installation.
+=============================================================
+
diff --git a/security/snortsam/files/snortsam.sh.in b/security/snortsam/files/snortsam.sh.in
new file mode 100644
index 000000000000..3f15c079042f
--- /dev/null
+++ b/security/snortsam/files/snortsam.sh.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+# $FreeBSD:
+
+# PROVIDE: snortsam
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable snortsam:
+# snortsam_enable (bool): Set to YES to enable snortsam
+# Default: NO
+# snortsam_flags (str): Extra flags passed to snortsam
+# Default: ""
+# snortsam_conf (str): Snortsam configuration file
+# Default: ${PREFIX}/etc/snortsam/snortsam.conf
+#
+
+. %%RC_SUBR%%
+
+name="snortsam"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/snortsam"
+
+load_rc_config $name
+
+[ -z "$snortsam_enable" ] && snortsam_enable="NO"
+[ -z "$snortsam_conf" ] && snortsam_conf="%%PREFIX%%/etc/snortsam/snortsam.conf"
+[ -z "$snortsam_flags" ] && snortsam_flags=""
+
+[ -n "$snortsam_conf" ] && snortsam_flags="$snortsam_flags $snortsam_conf"
+
+run_rc_command "$1"