def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) # Arbitrary test display self.display = ":10" self.confPath = "/etc/X11/xorg.conf" self.backupSpace = self._backups.getBackup(str(self)) self._issue = SimpleIssue(self.name, "X server didn't start")
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self.currentFileDict = {} #what we read from /etc/mdadm.conf self.scannedFileDict = {} #what `mdadm --misc --detail --scan` self.scannedFile = None # what `mdadm --misc --detail --scan` returns self.configFile = os.path.join(Config.system.root, "/etc/mdadm.conf") self.backupSpace = self._backups.getBackup(str(self)) self._issue = SimpleIssue(self.name, "mdadm.con misconfigured")
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._issue = SimpleIssue(self.name, self.description) self.initrd = None # self.initrd_path = None self.kernel_version = None self.kernel_re = re.compile(".*initrd-(?P<kernel>.*)\.img") self.initrds = [] # array of intirds found ing menu.lst
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) # Dictionary that will hold the partitions that are not included in the # partition table of a certain disk and can be recovered. It will also # house the initial partition table and the partition table that is a # result of running the fix. The structure is: # slef.disks={diskname: [ [recoverables], initialPT, finalPT ], .... } self.disks = {}
def oscap_callback(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str result = Msg.user2num setattr(self._info, Id, unicode(result)) Issue = Plugin._issues.get(Id, None) Issue.set(skipped = (result in (openscap.OSCAP.XCCDF_RESULT_NOT_CHECKED, openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED, openscap.OSCAP.XCCDF_RESULT_NOT_APPLICABLE, openscap.OSCAP.XCCDF_RESULT_UNKNOWN)), checked = (result in (openscap.OSCAP.XCCDF_RESULT_FAIL, openscap.OSCAP.XCCDF_RESULT_PASS)), error = (result in (openscap.OSCAP.XCCDF_RESULT_ERROR,)), happened = (result == openscap.OSCAP.XCCDF_RESULT_FAIL), fixed = False, reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) except Exception, e: print e
def oscap_callback_start(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str setattr(self._info, Id, unicode(-1)) Issue = Plugin._issues.get(Id, None) if Issue is None: title = Msg.user3str description = Msg.string Issue = SimpleIssue(Id, title) Issue.set(reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) Plugin._issues[Id] = Issue except Exception, e: print e
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._ui = volume_key.UI() self._ui.generic_cb = self._vk_ui_generic_cb self._ui.passphrase_cb = self._vk_ui_passphrase_cb
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._oval = "/usr/share/openscap/oval.xml" self._xccdf = "/usr/share/openscap/scap-xccdf.xml" self._issues = {}
openscap.OSCAP.XCCDF_RESULT_NOT_APPLICABLE, openscap.OSCAP.XCCDF_RESULT_UNKNOWN)), checked = (result in (openscap.OSCAP.XCCDF_RESULT_FAIL, openscap.OSCAP.XCCDF_RESULT_PASS)), error = (result in (openscap.OSCAP.XCCDF_RESULT_ERROR,)), happened = (result == openscap.OSCAP.XCCDF_RESULT_FAIL), fixed = False, reporting = Plugin._reporting, origin = Plugin, level = PLUGIN) except Exception, e: print e if Plugin.continuing(): return 0 else: return 1 def oscap_callback_start(self, Msg, Plugin): if Msg.user2num == openscap.OSCAP.XCCDF_RESULT_NOT_SELECTED: if Plugin.continuing(): return 0 else: return 1 try: Id = Msg.user1str
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs)
def getDeps(cls): return set(["sample_dependency"]).union(Plugin.getDeps())
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._issue = SimpleIssue(self.name, self.description) self._yum_repos_d = "/etc/yum.repos.d"
def getDeps(cls): return set(["root"]).union(Plugin.getDeps())
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._issue = SimpleIssue(self.name, self.description)
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._reporting.info("Entering the init phase...", origin=self)
def getDeps(cls): return set(["interactive"]).union(Plugin.getDeps())
def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) self._issue = SimpleIssue(self.name, "Discovering system properties failed")