mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
parent
0003e72c63
commit
ab57130178
@ -125,10 +125,6 @@ Status TablePlugin::call(const PluginRequest& request,
|
|||||||
// The "columns" action returns a PluginRequest filled with column
|
// The "columns" action returns a PluginRequest filled with column
|
||||||
// information such as name and type.
|
// information such as name and type.
|
||||||
response = routeInfo();
|
response = routeInfo();
|
||||||
} else if (request.at("action") == "definition") {
|
|
||||||
response.push_back({
|
|
||||||
{"definition", columnDefinition()},
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
return Status(1, "Unknown table plugin action: " + request.at("action"));
|
return Status(1, "Unknown table plugin action: " + request.at("action"));
|
||||||
}
|
}
|
||||||
|
@ -1074,13 +1074,15 @@ inline void meta_schema(int nArg, char** azArg) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
osquery::PluginRequest request = {{"action", "definition"}};
|
|
||||||
osquery::PluginResponse response;
|
osquery::PluginResponse response;
|
||||||
osquery::Registry::call("table", table_name, request, response);
|
auto status = osquery::Registry::call(
|
||||||
fprintf(stdout,
|
"table", table_name, {{"action", "columns"}}, response);
|
||||||
"CREATE TABLE %s%s;\n",
|
if (status.ok()) {
|
||||||
table_name.c_str(),
|
fprintf(stdout,
|
||||||
response[0].at("definition").c_str());
|
"CREATE TABLE %s%s;\n",
|
||||||
|
table_name.c_str(),
|
||||||
|
osquery::columnDefinition(response, true).c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user