Skip to content

Commit

Permalink
chore(userspace/falco): output class does not need to inherit from fa…
Browse files Browse the repository at this point in the history
…lco_common

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
  • Loading branch information
leogr committed Oct 20, 2020
1 parent 10a40c8 commit 2eb14e8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions userspace/falco/event_drops.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2019 The Falco Authors.
Copyright (C) 2020 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,6 +15,7 @@ limitations under the License.
*/

#include "event_drops.h"
#include "falco_common.h"
#include "banned.h" // This raises a compilation error when certain functions are used

syscall_evt_drop_mgr::syscall_evt_drop_mgr():
Expand Down Expand Up @@ -137,7 +138,7 @@ bool syscall_evt_drop_mgr::perform_actions(uint64_t now, scap_stats &delta, bool

case ACT_ALERT:
m_outputs->handle_msg(now,
falco_outputs::PRIORITY_CRITICAL,
falco_common::PRIORITY_CRITICAL,
msg,
rule,
output_fields);
Expand Down
1 change: 0 additions & 1 deletion userspace/falco/falco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ int falco_init(int argc, char **argv)
}

outputs = new falco_outputs();
outputs->set_inspector(inspector);

// Some combinations of arguments are not allowed.
if (daemon && pidfilename == "") {
Expand Down
6 changes: 0 additions & 6 deletions userspace/falco/falco_outputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ void falco_outputs::init(bool json_output,
uint32_t rate, uint32_t max_burst, bool buffered,
bool time_format_iso_8601, string hostname)
{
// The engine must have been given an inspector by now.
if(!m_inspector)
{
throw falco_exception("No inspector provided");
}

m_json_output = json_output;

// Note that falco_formats is already initialized by the engine,
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/falco_outputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.
// falco output engine. The falco rules engine is implemented by a
// separate class falco_engine.
//
class falco_outputs : public falco_common
class falco_outputs
{
public:
falco_outputs();
Expand Down

0 comments on commit 2eb14e8

Please sign in to comment.