예제 #1
0
 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")
예제 #2
0
 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")
예제 #3
0
 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
예제 #4
0
    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 = {}
예제 #5
0
 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
예제 #6
0
 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
예제 #7
0
    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
예제 #8
0
 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 = {}
예제 #9
0
                                  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
예제 #10
0
 def __init__(self, *args, **kwargs):
     Plugin.__init__(self, *args, **kwargs)
예제 #11
0
 def getDeps(cls):
     return set(["sample_dependency"]).union(Plugin.getDeps())
예제 #12
0
 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"
예제 #13
0
 def getDeps(cls):
     return set(["root"]).union(Plugin.getDeps())
예제 #14
0
 def __init__(self, *args, **kwargs):
     Plugin.__init__(self, *args, **kwargs)
     self._issue = SimpleIssue(self.name, self.description)
예제 #15
0
 def __init__(self, *args, **kwargs):
     Plugin.__init__(self, *args, **kwargs)
     self._reporting.info("Entering the init phase...", origin=self)
예제 #16
0
 def getDeps(cls):
     return set(["interactive"]).union(Plugin.getDeps())
예제 #17
0
 def __init__(self, *args, **kwargs):
     Plugin.__init__(self, *args, **kwargs)
     self._issue = SimpleIssue(self.name, "Discovering system properties failed")