Home
last modified time | relevance | path

Searched refs:refpolicy (Results 1 – 19 of 19) sorted by relevance

/external/selinux/python/sepolgen/tests/
Dtest_refpolicy.py21 import sepolgen.refpolicy as refpolicy namespace
27 s = refpolicy.IdSet(["read", "write", "getattr"])
33 s = refpolicy.IdSet()
40 s1 = refpolicy.XpermSet()
44 s2 = refpolicy.XpermSet(True)
51 s = refpolicy.XpermSet()
68 s = refpolicy.XpermSet()
76 a = refpolicy.XpermSet()
79 b = refpolicy.XpermSet()
87 a = refpolicy.XpermSet()
[all …]
Dtest_policygen.py23 import sepolgen.refpolicy as refpolicy namespace
57 self.assertIsInstance(r, refpolicy.AVRule)
67 av1.xperms['ioctl'] = refpolicy.XpermSet()
70 av2.xperms['ioctl'] = refpolicy.XpermSet()
73 av3.xperms['ioctl'] = refpolicy.XpermSet()
89 if isinstance(r, refpolicy.AVRule):
94 elif isinstance(r, refpolicy.AVExtRule):
116 xp1 = refpolicy.XpermSet()
132 xp2 = refpolicy.XpermSet()
Dtest_interfaces.py25 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 …]
Dtest_access.py21 import sepolgen.refpolicy as refpolicy namespace
33 self.assertTrue(isinstance(a.perms, refpolicy.IdSet))
144 b.perms = refpolicy.IdSet(["read"])
148 b.perms = refpolicy.IdSet(["read", "write", "append"])
151 b.perms = refpolicy.IdSet(["read", "append"])
166 xp = refpolicy.XpermSet()
179 xp = refpolicy.XpermSet()
193 xp1 = refpolicy.XpermSet()
198 xp2 = refpolicy.XpermSet()
212 xp1 = refpolicy.XpermSet()
[all …]
Dtest_module.py28 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)
Dtest_refparser.py22 import sepolgen.refpolicy as refpolicy namespace
Dtest_audit.py22 import sepolgen.refpolicy
74 sc = sepolgen.refpolicy.SecurityContext()
/external/selinux/python/sepolgen/src/sepolgen/
Drefparser.py40 from . import refpolicy
356 m = refpolicy.ModuleDeclaration()
359 m.refpolicy = True
365 x = refpolicy.Interface(p[4])
373 x = refpolicy.Template(p[4])
404 o = refpolicy.OptionalPolicy()
414 x = refpolicy.TunablePolicy()
440 x = refpolicy.IfDef(p[4])
455 i = refpolicy.InterfaceCall(ifname=p[1])
487 s = refpolicy.ObjPermSet(p[4])
[all …]
Dpolicygen.py33 from . import refpolicy
83 self.module = refpolicy.Module()
133 refpolicy = True
135 refpolicy = False
137 mod.refpolicy = refpolicy
147 m = refpolicy.ModuleDeclaration()
152 m.refpolicy = True
154 m.refpolicy = False
167 rule = refpolicy.AVRule(av)
173 rule.comment = str(refpolicy.Comment(explain_access(av, verbosity=self.explain)))
[all …]
Doutput.py30 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) or isinstance(b, refpolicy.AVExtRule):
120 c.append(refpolicy.Comment())
125 c.append(refpolicy.Comment())
140 if isinstance(rule, refpolicy.InterfaceCall):
147 sep_rules.append(refpolicy.Comment())
149 comment = refpolicy.Comment()
[all …]
Dinterfaces.py28 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 …]
Daudit.py23 from . import refpolicy
173 self.scontext = refpolicy.SecurityContext()
174 self.tcontext = refpolicy.SecurityContext()
228 self.scontext = refpolicy.SecurityContext(fields[1])
231 self.tcontext = refpolicy.SecurityContext(fields[1])
315 self.invalid_context = refpolicy.SecurityContext()
316 self.scontext = refpolicy.SecurityContext()
317 self.tcontext = refpolicy.SecurityContext()
326 self.invalid_context = refpolicy.SecurityContext(recs[5])
327 self.scontext = refpolicy.SecurityContext(recs[7].split("=")[1])
[all …]
Daccess.py34 from . import refpolicy
90 self.perms = refpolicy.IdSet()
123 self.perms = refpolicy.IdSet(list[3:])
143 self.xperms[op] = refpolicy.XpermSet()
299 types = refpolicy.IdSet()
312 s = refpolicy.IdSet()
340 role_type = refpolicy.RoleType()
Dmodule.py158 def create_module_package(self, sourcename, refpolicy=True): argument
174 if refpolicy:
Drefpolicy.py696 self.refpolicy = False
699 if self.refpolicy:
/external/selinux/libsepol/tests/
DMakefile72 …../../checkpolicy/checkpolicy -M policies/test-cond/refpolicy-base.conf -o policies/test-downgrade…
/external/selinux/python/audit2allow/
Daudit2why234 mc.create_module_package(filename, self.__options.refpolicy)
320 if self.__options.refpolicy:
Daudit2allow234 mc.create_module_package(filename, self.__options.refpolicy)
320 if self.__options.refpolicy:
/external/selinux/python/sepolgen/
DHACKING17 Reference Policy Representation (sepolgen.refpolicy)