Lines Matching refs:xpd

62 	struct extended_perms_decision xpd;  member
244 if (xpd_node->xpd.driver == driver) in avc_xperms_decision_lookup()
245 return &xpd_node->xpd; in avc_xperms_decision_lookup()
251 avc_xperms_has_perm(struct extended_perms_decision *xpd, in avc_xperms_has_perm() argument
257 (xpd->used & XPERMS_ALLOWED)) in avc_xperms_has_perm()
258 rc = security_xperm_test(xpd->allowed->p, perm); in avc_xperms_has_perm()
260 (xpd->used & XPERMS_AUDITALLOW)) in avc_xperms_has_perm()
261 rc = security_xperm_test(xpd->auditallow->p, perm); in avc_xperms_has_perm()
263 (xpd->used & XPERMS_DONTAUDIT)) in avc_xperms_has_perm()
264 rc = security_xperm_test(xpd->dontaudit->p, perm); in avc_xperms_has_perm()
271 struct extended_perms_decision *xpd; in avc_xperms_allow_perm() local
273 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_xperms_allow_perm()
274 if (xpd && xpd->allowed) in avc_xperms_allow_perm()
275 security_xperm_set(xpd->allowed->p, perm); in avc_xperms_allow_perm()
280 struct extended_perms_decision *xpd; in avc_xperms_decision_free() local
282 xpd = &xpd_node->xpd; in avc_xperms_decision_free()
283 if (xpd->allowed) in avc_xperms_decision_free()
284 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed); in avc_xperms_decision_free()
285 if (xpd->auditallow) in avc_xperms_decision_free()
286 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow); in avc_xperms_decision_free()
287 if (xpd->dontaudit) in avc_xperms_decision_free()
288 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit); in avc_xperms_decision_free()
349 struct extended_perms_decision *xpd; in avc_xperms_decision_alloc() local
356 xpd = &xpd_node->xpd; in avc_xperms_decision_alloc()
358 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
360 if (!xpd->allowed) in avc_xperms_decision_alloc()
364 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
366 if (!xpd->auditallow) in avc_xperms_decision_alloc()
370 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
372 if (!xpd->dontaudit) in avc_xperms_decision_alloc()
390 avc_copy_xperms_decision(&dest_xpd->xpd, src); in avc_add_xperms_decision()
425 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used); in avc_xperms_populate()
428 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd); in avc_xperms_populate()
441 struct extended_perms_decision *xpd, in avc_xperms_audit_required() argument
451 if (audited && xpd) { in avc_xperms_audit_required()
452 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT)) in avc_xperms_audit_required()
459 if (audited && xpd) { in avc_xperms_audit_required()
460 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW)) in avc_xperms_audit_required()
471 struct extended_perms_decision *xpd, in avc_xperms_audit() argument
478 requested, avd, xpd, perm, result, &denied); in avc_xperms_audit()
822 struct extended_perms_decision *xpd, in avc_update_node() argument
898 avc_add_xperms_decision(node, xpd); in avc_update_node()
1011 struct extended_perms_decision *xpd = NULL; in avc_has_extended_perms() local
1039 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_has_extended_perms()
1040 if (unlikely(!xpd)) { in avc_has_extended_perms()
1056 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd); in avc_has_extended_perms()
1058 xpd = &local_xpd; in avc_has_extended_perms()
1060 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED)) in avc_has_extended_perms()
1072 &avd, xpd, xperm, rc, ad); in avc_has_extended_perms()