From: Jason Ish Date: Thu, 9 Dec 2021 22:59:04 +0000 (-0600) Subject: datasets: initialize after dropping privileges X-Git-Tag: suricata-7.0.0-beta1~1112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92eb14c5adc985433dd44bdcac18fa6e67440043;p=thirdparty%2Fsuricata.git datasets: initialize after dropping privileges Move initialization of datasets to a point after privileges have been dropped. Ticket 4239 --- diff --git a/src/suricata.c b/src/suricata.c index 3bd1e8133a..dc26a13c40 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2000,8 +2000,6 @@ static int InitSignalHandler(SCInstance *suri) * Will be run once per pcap in unix-socket mode */ void PreRunInit(const int runmode) { - /* Initialize Datasets to be able to use them with unix socket */ - DatasetsInit(); HttpRangeContainersInit(); if (runmode == RUNMODE_UNIX_SOCKET) return; @@ -2029,6 +2027,7 @@ void PreRunPostPrivsDropInit(const int runmode) { StatsSetupPostConfigPreOutput(); RunModeInitializeOutputs(); + DatasetsInit(); if (runmode == RUNMODE_UNIX_SOCKET) { /* As the above did some necessary startup initialization, it