Exemplo n.º 1
0
    def test_borked_obj_is_covered_2(self):
        obj = ChangeProfileRule.parse('change_profile /foo,')

        testobj = ChangeProfileRule(None, '/foo', '/bar')
        testobj.targetprofile = ''

        with self.assertRaises(AppArmorBug):
            obj.is_covered(testobj)
Exemplo n.º 2
0
    def test_borked_obj_is_covered_2(self):
        obj = ChangeProfileRule.parse('change_profile /foo,')

        testobj = ChangeProfileRule('/foo', '/bar')
        testobj.targetprofile = ''

        with self.assertRaises(AppArmorBug):
            obj.is_covered(testobj)
Exemplo n.º 3
0
 def test_empty_net_data_2(self):
     obj = ChangeProfileRule(None, '/foo', '/bar')
     obj.targetprofile = ''
     # no targetprofile set, and ALL not set
     with self.assertRaises(AppArmorBug):
         obj.get_clean(1)
Exemplo n.º 4
0
 def test_empty_net_data_2(self):
     obj = ChangeProfileRule('/foo', '/bar')
     obj.targetprofile = ''
     # no targetprofile set, and ALL not set
     with self.assertRaises(AppArmorBug):
         obj.get_clean(1)