Skip to content

Commit

Permalink
datasets: initialize after dropping privileges
Browse files Browse the repository at this point in the history
Move initialization of datasets to a point after privileges
have been dropped.

Ticket 4239
  • Loading branch information
jasonish authored and victorjulien committed Dec 13, 2021
1 parent d67f8f9 commit 92eb14c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/suricata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 92eb14c

Please sign in to comment.