further refinement of disabling plaso be default

This commit is contained in:
Kelly Kelly 2019-08-01 13:53:23 -04:00
parent df86ce32ae
commit c05c27c7a0

View File

@ -331,16 +331,16 @@ public final class IngestJobSettings {
} }
/** /**
* Hard coding Plaso to be disabled by default. loadedModuleNames is passed * Hard coding Plaso to be disabled by default. loadedModuleNames is
* below as the default list of enabled modules so briefly * passed below as the default list of enabled modules so briefly remove
* remove Plaso from loaded modules to get the list of enabled and * Plaso from loaded modules to get the list of enabled and disabled
* disabled modules names. Then put Plaso back into loadedModulesNames to let * modules names. Then put Plaso back into loadedModulesNames to let the
* the rest of the code continue as before. * rest of the code continue as before.
*/ */
final String plasoModuleName = "Plaso"; final String plasoModuleName = "Plaso";
boolean plasoLoaded = loadedModuleNames.contains(plasoModuleName); boolean plasoLoaded = loadedModuleNames.contains(plasoModuleName);
if (plasoLoaded) { if (plasoLoaded) {
loadedModuleNames.remove(plasoModuleName); loadedModuleNames.remove(plasoModuleName);
} }
/** /**
@ -349,7 +349,7 @@ public final class IngestJobSettings {
*/ */
HashSet<String> enabledModuleNames = getModulesNames(executionContext, IngestJobSettings.ENABLED_MODULES_PROPERTY, makeCsvList(loadedModuleNames)); HashSet<String> enabledModuleNames = getModulesNames(executionContext, IngestJobSettings.ENABLED_MODULES_PROPERTY, makeCsvList(loadedModuleNames));
HashSet<String> disabledModuleNames = getModulesNames(executionContext, IngestJobSettings.DISABLED_MODULES_PROPERTY, plasoModuleName); //NON-NLS HashSet<String> disabledModuleNames = getModulesNames(executionContext, IngestJobSettings.DISABLED_MODULES_PROPERTY, plasoModuleName); //NON-NLS
// If plaso was loaded, but appears in neither the enabled nor the // If plaso was loaded, but appears in neither the enabled nor the
// disabled list, add it to the disabled list. // disabled list, add it to the disabled list.
if (!enabledModuleNames.contains(plasoModuleName) && !disabledModuleNames.contains(plasoModuleName)) { if (!enabledModuleNames.contains(plasoModuleName) && !disabledModuleNames.contains(plasoModuleName)) {