summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian-default-cfg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/debian-default-cfg.patch')
-rw-r--r--debian/patches/debian-default-cfg.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/debian-default-cfg.patch b/debian/patches/debian-default-cfg.patch
new file mode 100644
index 0000000..bf872cf
--- /dev/null
+++ b/debian/patches/debian-default-cfg.patch
@@ -0,0 +1,43 @@
+From: Arturo Borrero Gonzalez <arturo@debian.org>
+Subject: Debian default configuration
+ This patch sets Debian defaults for suricata configuration.
+ .
+ Currently, it sets a proper path for suricata unix socket.
+Forwarded: not-needed
+Last-Update: 2016-12-01
+
+--- a/suricata.yaml.in
++++ b/suricata.yaml.in
+@@ -1291,8 +1291,8 @@
+ # activated in live capture mode. You can use the filename variable to set
+ # the file name of the socket.
+ unix-command:
+- enabled: auto
+- #filename: custom.socket
++ enabled: yes
++ filename: @e_localstatedir@suricata-command.socket
+
+ # Magic file. The extension .mgc is added to the value here.
+ #magic-file: /usr/share/file/magic
+--- a/src/unix-manager.c
++++ b/src/unix-manager.c
+@@ -57,7 +57,7 @@
+ # endif
+ #endif
+
+-#define SOCKET_PATH LOCAL_STATE_DIR "/run/suricata/"
++#define SOCKET_PATH LOCAL_STATE_DIR "/"
+ #define SOCKET_FILENAME "suricata-command.socket"
+ #define SOCKET_TARGET SOCKET_PATH SOCKET_FILENAME
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -2566,7 +2566,7 @@
+ EXPAND_VARIABLE(localstatedir, e_logfilesdir, "/log/suricata/files")
+ EXPAND_VARIABLE(localstatedir, e_logcertsdir, "/log/suricata/certs")
+ EXPAND_VARIABLE(sysconfdir, e_sysconfdir, "/suricata/")
+- EXPAND_VARIABLE(localstatedir, e_localstatedir, "/run/suricata")
++ EXPAND_VARIABLE(localstatedir, e_localstatedir, "/run/")
+ EXPAND_VARIABLE(datadir, e_datarulesdir, "/suricata/rules")
+ EXPAND_VARIABLE(localstatedir, e_datadir, "/lib/suricata/data")
+ EXPAND_VARIABLE(localstatedir, e_defaultruledir, "/lib/suricata/rules")