From 98b662105425092b10f294407fbd29a8833cbd42 Mon Sep 17 00:00:00 2001 From: "Zane C. Bowers-Hadley" Date: Wed, 19 Oct 2022 02:59:03 -0500 Subject: [PATCH] teak the suricata table some and update the freebsd init script --- init/freebsd | 3 ++- lib/Lilith.pm | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/init/freebsd b/init/freebsd index 9f8be92..b698edf 100644 --- a/init/freebsd +++ b/init/freebsd @@ -23,6 +23,7 @@ load_rc_config $name # set defaults : ${lilith_enable:=NO} : ${lilith_user:="root"} +: ${lilith_wheel:="wheel"} : ${lilith_flags:=""} : ${lilith_facility:="daemon"} : ${lilith_priority:="debug"} @@ -31,7 +32,7 @@ pidfile="/var/run/${name}/pid" command="/usr/local/bin/${name}" command_interpreter="/usr/local/bin/perl" pidfile="/var/run/${name}/pid" -command_args="-a run --daemonize" +command_args="-a run --daemonize --user ${lilith_user} --group ${lilith_group}" start_precmd="${name}_precmd" lilith_precmd() diff --git a/lib/Lilith.pm b/lib/Lilith.pm index 4033c7c..c5e9e8e 100644 --- a/lib/Lilith.pm +++ b/lib/Lilith.pm @@ -286,11 +286,11 @@ sub create_tables { . 'flow_pkts_toclient integer, ' . 'flow_bytes_toclient integer, ' . 'flow_start TIMESTAMP WITH TIME ZONE, ' - . 'classification varchar(1024) NOT NULL, ' - . 'signature varchar(2048) NOT NULL,' - . 'gid int NOT NULL, ' - . 'sid bigint NOT NULL, ' - . 'rev bigint NOT NULL, ' + . 'classification varchar(1024), ' + . 'signature varchar(2048),' + . 'gid int, ' + . 'sid bigint, ' + . 'rev bigint, ' . 'raw json NOT NULL, ' . 'PRIMARY KEY(id) );' ); $sth->execute();