Lines Matching refs:avc
73 avc = sepolgen.audit.AVCMessage(audit1)
75 self.assertEqual(avc.scontext, sc)
76 self.assertEqual(avc.tcontext, sc)
77 self.assertEqual(avc.tclass, "")
78 self.assertEqual(avc.accesses, [])
79 self.assertEqual(avc.ioctlcmd, None)
82 avc = sepolgen.audit.AVCMessage(granted1)
83 avc.from_split_string(granted1.split())
85 self.assertEqual(avc.scontext.user, "user_u")
86 self.assertEqual(avc.scontext.role, "system_r")
87 self.assertEqual(avc.scontext.type, "unconfined_t")
88 self.assertEqual(avc.scontext.level, "s0")
90 self.assertEqual(avc.tcontext.user, "user_u")
91 self.assertEqual(avc.tcontext.role, "object_r")
92 self.assertEqual(avc.tcontext.type, "user_home_t")
93 self.assertEqual(avc.tcontext.level, "s0")
95 self.assertEqual(avc.tclass, "file")
96 self.assertEqual(avc.accesses, ["getattr"])
98 self.assertEqual(avc.denial, False)
102 avc = sepolgen.audit.AVCMessage(xperms1)
104 avc.from_split_string(recs)
106 self.assertEqual(avc.ioctlcmd, 66)
110 avc = sepolgen.audit.AVCMessage(xperms_invalid)
112 avc.from_split_string(recs)
114 self.assertIsNone(avc.ioctlcmd)
118 avc = sepolgen.audit.AVCMessage(xperms_without)
120 avc.from_split_string(recs)
122 self.assertIsNone(avc.ioctlcmd)
126 avc = sepolgen.audit.AVCMessage(audit1)
128 avc.from_split_string(recs)
130 self.assertEqual(avc.header, "audit(1158064002.046:4):")
131 self.assertEqual(avc.scontext.user, "user_u")
132 self.assertEqual(avc.scontext.role, "system_r")
133 self.assertEqual(avc.scontext.type, "bluetooth_helper_t")
134 self.assertEqual(avc.scontext.level, "s0-s0:c0")
136 self.assertEqual(avc.tcontext.user, "system_u")
137 self.assertEqual(avc.tcontext.role, "object_r")
138 self.assertEqual(avc.tcontext.type, "xdm_tmp_t")
139 self.assertEqual(avc.tcontext.level, "s0")
141 self.assertEqual(avc.tclass, "file")
142 self.assertEqual(avc.accesses, ["read"])
144 self.assertEqual(avc.comm, "bluez-pin")
147 self.assertEqual(avc.denial, True)
150 avc = sepolgen.audit.AVCMessage(audit2)
152 avc.from_split_string(recs)
154 self.assertEqual(avc.header, "audit(1158584779.745:708):")
155 self.assertEqual(avc.scontext.user, "user_u")
156 self.assertEqual(avc.scontext.role, "system_r")
157 self.assertEqual(avc.scontext.type, "vpnc_t")
158 self.assertEqual(avc.scontext.level, "s0")
160 self.assertEqual(avc.tcontext.user, "user_u")
161 self.assertEqual(avc.tcontext.role, "system_r")
162 self.assertEqual(avc.tcontext.type, "vpnc_t")
163 self.assertEqual(avc.tcontext.level, "s0")
165 self.assertEqual(avc.tclass, "capability")
166 self.assertEqual(avc.accesses, ["dac_read_search"])
168 self.assertEqual(avc.comm, "sh")
170 self.assertEqual(avc.denial, True)