chore: typos and miscellanea

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2019-09-16 21:26:59 +00:00
committed by Leo Di Donato
parent c96f096821
commit 836094b28e
6 changed files with 7 additions and 15 deletions

View File

@@ -267,7 +267,6 @@ int falco_formats::format_event (lua_State *ls)
}
int falco_formats::resolve_tokens(lua_State *ls)
{
if (!lua_isstring(ls, -1) ||
@@ -275,12 +274,10 @@ int falco_formats::resolve_tokens(lua_State *ls)
lua_pushstring(ls, "Invalid arguments passed to resolve_tokens()");
lua_error(ls);
}
gen_event* evt = (gen_event*)lua_topointer(ls, 1);
const char *source = (char *) lua_tostring(ls, 2); // TODO(fntlnz, leodido): do we need this one?
const char *format = (char *) lua_tostring(ls, 3);
gen_event* evt = (gen_event*) lua_topointer(ls, 1);
const char *format = (char *) lua_tostring(ls, 2);
string sformat = format;
map<string,string> values;
s_formatters->resolve_tokens((sinsp_evt *)evt, sformat, values);

View File

@@ -34,7 +34,6 @@ limitations under the License.
#include <unistd.h>
#include <getopt.h>
#include <sinsp.h>
#include "logger.h"
@@ -279,7 +278,7 @@ uint64_t do_inspect(falco_engine *engine,
}
else if (g_restart)
{
falco_logger::log(LOG_INFO, "SIGHUP Received, restarting...\n");
falco_logger::log(LOG_INFO, "SIGHUP received, restarting...\n");
break;
}
else if(rc == SCAP_TIMEOUT)
@@ -1239,7 +1238,8 @@ int falco_init(int argc, char **argv)
result = EXIT_FAILURE;
webserver.stop();
if (grpc_server_thread.joinable()) {
if(grpc_server_thread.joinable())
{
grpc_server.shutdown();
grpc_server_thread.join();
}

View File

@@ -59,6 +59,4 @@ message response {
string rule = 4;
string output = 5;
map<string, string> output_fields = 6;
}
// todo: investigate outputting tags
}

View File

@@ -303,7 +303,6 @@ int falco_outputs::handle_http(lua_State *ls)
return 1;
}
// TODO(fntlnz, leodido): verify if this works with k8s_audit as source
int falco_outputs::handle_grpc(lua_State *ls)
{
// check parameters

View File

@@ -39,8 +39,6 @@ protected:
void subscribe(const stream_context& ctx, const request& req, response& res);
private:
std::atomic<bool> m_stop{false};
};

View File

@@ -170,7 +170,7 @@ function mod.http_reopen()
end
function mod.grpc(event, rule, source, priority, priority_num, msg, format, options)
fields = formats.resolve_tokens(event, source, format)
fields = formats.resolve_tokens(event, format)
c_outputs.handle_grpc(event, rule, source, priority, msg, fields, options)
end