/external/selinux/python/sepolgen/tests/ |
D | test_refpolicy.py | 21 import sepolgen.refpolicy as refpolicy namespace 26 s = refpolicy.IdSet(["read", "write", "getattr"]) 32 s = refpolicy.IdSet() 38 sc = refpolicy.SecurityContext() 39 sc = refpolicy.SecurityContext("user_u:object_r:foo_t") 43 sc = refpolicy.SecurityContext() 56 sc = refpolicy.SecurityContext() 65 sc = refpolicy.SecurityContext() 69 sc1 = refpolicy.SecurityContext("user_u:object_r:foo_t") 70 sc2 = refpolicy.SecurityContext("user_u:object_r:foo_t") [all …]
|
D | test_interfaces.py | 25 import sepolgen.refpolicy as refpolicy namespace 34 self.assertEqual(p.type, refpolicy.SRC_TYPE) 49 self.assertEqual(p.type, refpolicy.SRC_TYPE) 50 self.assertEqual(p.obj_classes, refpolicy.IdSet(["file"])) 59 self.assertEqual(p.type, refpolicy.SRC_TYPE) 60 self.assertEqual(p.obj_classes, refpolicy.IdSet(["process"])) 69 self.assertEqual(p.type, refpolicy.SRC_TYPE) 70 self.assertEqual(p.obj_classes, refpolicy.IdSet(["dir"])) 79 self.assertEqual(p.type, refpolicy.TGT_TYPE) 80 self.assertEqual(p.obj_classes, refpolicy.IdSet(["dir"])) [all …]
|
D | test_access.py | 21 import sepolgen.refpolicy as refpolicy namespace 33 self.assertTrue(isinstance(a.perms, refpolicy.IdSet)) 139 b.perms = refpolicy.IdSet(["read"]) 143 b.perms = refpolicy.IdSet(["read", "write", "append"]) 146 b.perms = refpolicy.IdSet(["read", "append"]) 158 rule = refpolicy.AVRule() 180 self.assertEqual(av.perms, refpolicy.IdSet(["read", "write"])) 193 rule = refpolicy.AVRule() 223 self.assertEqual(av.perms, refpolicy.IdSet(["read", "write"])) 238 a.add("$1", "foo", "file", refpolicy.IdSet(["read", "write"])) [all …]
|
D | test_module.py | 28 mc.create_module_package("module_compile_test.te", refpolicy=True) 32 mc.refpolicy = True 33 mc.create_module_package("module_compile_test.te", refpolicy=False)
|
D | test_refparser.py | 22 import sepolgen.refpolicy as refpolicy namespace
|
D | test_audit.py | 22 import sepolgen.refpolicy 62 sc = sepolgen.refpolicy.SecurityContext()
|
/external/selinux/python/sepolgen/src/sepolgen/ |
D | refparser.py | 40 from . import refpolicy 354 m = refpolicy.ModuleDeclaration() 357 m.refpolicy = True 363 x = refpolicy.Interface(p[4]) 371 x = refpolicy.Template(p[4]) 402 o = refpolicy.OptionalPolicy() 412 x = refpolicy.TunablePolicy() 438 x = refpolicy.IfDef(p[4]) 453 i = refpolicy.InterfaceCall(ifname=p[1]) 485 s = refpolicy.ObjPermSet(p[4]) [all …]
|
D | policygen.py | 33 from . import refpolicy 82 self.module = refpolicy.Module() 125 refpolicy = True 127 refpolicy = False 129 mod.refpolicy = refpolicy 139 m = refpolicy.ModuleDeclaration() 144 m.refpolicy = True 146 m.refpolicy = False 158 rule = refpolicy.AVRule(av) 163 rule.comment = str(refpolicy.Comment(explain_access(av, verbosity=self.explain))) [all …]
|
D | output.py | 30 from . import refpolicy 51 for node, depth in refpolicy.walktree(self.module, showdepth=True): 97 if isinstance(a, refpolicy.InterfaceCall): 98 if isinstance(b, refpolicy.InterfaceCall): 103 if isinstance(b, refpolicy.AVRule): 120 c.append(refpolicy.Comment()) 125 c.append(refpolicy.Comment()) 139 if isinstance(rule, refpolicy.InterfaceCall): 146 sep_rules.append(refpolicy.Comment()) 148 comment = refpolicy.Comment() [all …]
|
D | interfaces.py | 28 from . import refpolicy 40 self.type = refpolicy.SRC_TYPE 41 self.obj_classes = refpolicy.IdSet() 58 (self.name, refpolicy.field_to_str[self.type], " ".join(self.obj_classes)) 70 if (type == refpolicy.SRC_TYPE or type == refpolicy.TGT_TYPE) and \ 71 (p.type == refpolicy.TGT_TYPE or p.type == refpolicy.SRC_TYPE): 88 p.type = refpolicy.SRC_TYPE 145 if __param_insert(av.src_type, refpolicy.SRC_TYPE, av, params) == 1: 149 if __param_insert(av.tgt_type, refpolicy.TGT_TYPE, av, params) == 1: 153 if __param_insert(av.obj_class, refpolicy.OBJ_CLASS, av, params) == 1: [all …]
|
D | audit.py | 23 from . import refpolicy 172 self.scontext = refpolicy.SecurityContext() 173 self.tcontext = refpolicy.SecurityContext() 226 self.scontext = refpolicy.SecurityContext(fields[1]) 229 self.tcontext = refpolicy.SecurityContext(fields[1]) 308 self.invalid_context = refpolicy.SecurityContext() 309 self.scontext = refpolicy.SecurityContext() 310 self.tcontext = refpolicy.SecurityContext() 319 self.invalid_context = refpolicy.SecurityContext(recs[5]) 320 self.scontext = refpolicy.SecurityContext(recs[7].split("=")[1]) [all …]
|
D | access.py | 34 from . import refpolicy 89 self.perms = refpolicy.IdSet() 120 self.perms = refpolicy.IdSet(list[3:]) 287 types = refpolicy.IdSet() 300 s = refpolicy.IdSet() 328 role_type = refpolicy.RoleType()
|
D | module.py | 158 def create_module_package(self, sourcename, refpolicy=True): argument 174 if refpolicy:
|
D | refpolicy.py | 569 self.refpolicy = False 572 if self.refpolicy:
|
/external/selinux/libsepol/tests/ |
D | Makefile | 51 …../../checkpolicy/checkpolicy -M policies/test-cond/refpolicy-base.conf -o policies/test-downgrade…
|
/external/selinux/python/audit2allow/ |
D | audit2allow | 232 mc.create_module_package(filename, self.__options.refpolicy) 313 if self.__options.refpolicy:
|
D | audit2why | 232 mc.create_module_package(filename, self.__options.refpolicy) 313 if self.__options.refpolicy:
|
/external/selinux/python/sepolgen/ |
D | HACKING | 17 Reference Policy Representation (sepolgen.refpolicy)
|