Lines Matching refs:xpd

62 	struct extended_perms_decision xpd;  member
183 if (xpd_node->xpd.driver == driver) in avc_xperms_decision_lookup()
184 return &xpd_node->xpd; in avc_xperms_decision_lookup()
190 avc_xperms_has_perm(struct extended_perms_decision *xpd, in avc_xperms_has_perm() argument
196 (xpd->used & XPERMS_ALLOWED)) in avc_xperms_has_perm()
197 rc = security_xperm_test(xpd->allowed->p, perm); in avc_xperms_has_perm()
199 (xpd->used & XPERMS_AUDITALLOW)) in avc_xperms_has_perm()
200 rc = security_xperm_test(xpd->auditallow->p, perm); in avc_xperms_has_perm()
202 (xpd->used & XPERMS_DONTAUDIT)) in avc_xperms_has_perm()
203 rc = security_xperm_test(xpd->dontaudit->p, perm); in avc_xperms_has_perm()
210 struct extended_perms_decision *xpd; in avc_xperms_allow_perm() local
212 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_xperms_allow_perm()
213 if (xpd && xpd->allowed) in avc_xperms_allow_perm()
214 security_xperm_set(xpd->allowed->p, perm); in avc_xperms_allow_perm()
219 struct extended_perms_decision *xpd; in avc_xperms_decision_free() local
221 xpd = &xpd_node->xpd; in avc_xperms_decision_free()
222 if (xpd->allowed) in avc_xperms_decision_free()
223 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed); in avc_xperms_decision_free()
224 if (xpd->auditallow) in avc_xperms_decision_free()
225 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow); in avc_xperms_decision_free()
226 if (xpd->dontaudit) in avc_xperms_decision_free()
227 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit); in avc_xperms_decision_free()
288 struct extended_perms_decision *xpd; in avc_xperms_decision_alloc() local
295 xpd = &xpd_node->xpd; in avc_xperms_decision_alloc()
297 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
299 if (!xpd->allowed) in avc_xperms_decision_alloc()
303 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
305 if (!xpd->auditallow) in avc_xperms_decision_alloc()
309 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
311 if (!xpd->dontaudit) in avc_xperms_decision_alloc()
328 avc_copy_xperms_decision(&dest_xpd->xpd, src); in avc_add_xperms_decision()
363 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used); in avc_xperms_populate()
366 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd); in avc_xperms_populate()
379 struct extended_perms_decision *xpd, in avc_xperms_audit_required() argument
389 if (audited && xpd) { in avc_xperms_audit_required()
390 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT)) in avc_xperms_audit_required()
397 if (audited && xpd) { in avc_xperms_audit_required()
398 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW)) in avc_xperms_audit_required()
409 struct extended_perms_decision *xpd, in avc_xperms_audit() argument
416 requested, avd, xpd, perm, result, &denied); in avc_xperms_audit()
825 struct extended_perms_decision *xpd, in avc_update_node() argument
902 rc = avc_add_xperms_decision(node, xpd); in avc_update_node()
1021 struct extended_perms_decision *xpd = NULL; in avc_has_extended_perms() local
1050 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_has_extended_perms()
1051 if (unlikely(!xpd)) { in avc_has_extended_perms()
1068 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd); in avc_has_extended_perms()
1070 xpd = &local_xpd; in avc_has_extended_perms()
1072 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED)) in avc_has_extended_perms()
1084 &avd, xpd, xperm, rc, ad); in avc_has_extended_perms()