Remove earliler trigger of SymbolError

This commit is contained in:
Andrew Case
2020-01-03 17:50:06 +00:00
committed by ikelos
parent a66e1bb6c2
commit 3bf3e0601a
+2 -3
View File
@@ -42,14 +42,13 @@ class Lsmod(plugins.PluginInterface):
Yields:
The modules present in the `layer_name` layer's modules list
This function will throw a SymbolError exception if kernel module support is not enabled.
"""
linux.LinuxUtilities.aslr_mask_symbol_table(context, vmlinux_symbols, layer_name)
vmlinux = contexts.Module(context, vmlinux_symbols, layer_name, 0)
# this will cause an exception if module support is not compiled into the kernel
vmlinux.get_type("module")
modules = vmlinux.object_from_symbol(symbol_name = "modules").cast("list_head")
table_name = modules.vol.type_name.split(constants.BANG)[0]