Skip to content

Commit

Permalink
Merge pull request #23 from osquery/0.2.0
Browse files Browse the repository at this point in the history
Bumping API to osquery SDK version 1.8.0
  • Loading branch information
Teddy Reed authored Jul 20, 2016
2 parents 0bdfa8b + 3b777ab commit 8e1d542
Show file tree
Hide file tree
Showing 8 changed files with 277 additions and 60 deletions.
2 changes: 2 additions & 0 deletions osquery.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ service Extension {
2:string item,
/// The thrift-equivilent of an osquery::PluginRequest.
3:ExtensionPluginRequest request),
/// Request that an extension shutdown (does not apply to managers).
void shutdown(),
}

/// The extension manager is run by the osquery core process.
Expand Down
6 changes: 6 additions & 0 deletions osquery/extension_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from __future__ import print_function
from __future__ import unicode_literals

import sys

from osquery.extensions.Extension import Iface
from osquery.extensions.ttypes import ExtensionResponse, ExtensionStatus
from osquery.singleton import Singleton
Expand Down Expand Up @@ -60,6 +62,10 @@ def add_plugin(self, plugin):
if obj.name() not in self._plugins[obj.registry_name()]:
self._plugins[obj.registry_name()][obj.name()] = obj

def shutdown(self):
"""The osquery extension manager requested a shutdown"""
sys.exit(0)

def registry(self):
"""Accessor for the internal _registry member variable"""
return self._registry
Expand Down
180 changes: 168 additions & 12 deletions osquery/extensions/Extension.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8e1d542

Please sign in to comment.