Refactor symbol to object_type (so it doesn't shadow builtin type).

This commit is contained in:
Mike Auty
2019-08-14 20:50:42 +01:00
committed by ikelos
parent 18283ab410
commit be27aab8ae
27 changed files with 89 additions and 79 deletions
@@ -36,7 +36,7 @@ class Check_sysctl(plugins.PluginInterface):
var_name = known_sysctls[name]
try:
var_array = kernel.object(symbol = var_name)
var_array = kernel.object(object_type = var_name)
except exceptions.SymbolError:
var_array = None
@@ -110,7 +110,7 @@ class Check_sysctl(plugins.PluginInterface):
kernel = contexts.Module(self._context, self.config['darwin'], self.config['primary'], 0)
sysctl_list = kernel.object_from_symbol(symbol = "sysctl__children")
sysctl_list = kernel.object_from_symbol(object_type = "sysctl__children")
for sysctl, name, val in self._process_sysctl_list(kernel, sysctl_list):
check_addr = sysctl.oid_handler