Lines Matching refs:xpd

62 	struct extended_perms_decision xpd;  member
191 if (xpd_node->xpd.driver == driver) in avc_xperms_decision_lookup()
192 return &xpd_node->xpd; in avc_xperms_decision_lookup()
198 avc_xperms_has_perm(struct extended_perms_decision *xpd, in avc_xperms_has_perm() argument
204 (xpd->used & XPERMS_ALLOWED)) in avc_xperms_has_perm()
205 rc = security_xperm_test(xpd->allowed->p, perm); in avc_xperms_has_perm()
207 (xpd->used & XPERMS_AUDITALLOW)) in avc_xperms_has_perm()
208 rc = security_xperm_test(xpd->auditallow->p, perm); in avc_xperms_has_perm()
210 (xpd->used & XPERMS_DONTAUDIT)) in avc_xperms_has_perm()
211 rc = security_xperm_test(xpd->dontaudit->p, perm); in avc_xperms_has_perm()
218 struct extended_perms_decision *xpd; in avc_xperms_allow_perm() local
220 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_xperms_allow_perm()
221 if (xpd && xpd->allowed) in avc_xperms_allow_perm()
222 security_xperm_set(xpd->allowed->p, perm); in avc_xperms_allow_perm()
227 struct extended_perms_decision *xpd; in avc_xperms_decision_free() local
229 xpd = &xpd_node->xpd; in avc_xperms_decision_free()
230 if (xpd->allowed) in avc_xperms_decision_free()
231 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed); in avc_xperms_decision_free()
232 if (xpd->auditallow) in avc_xperms_decision_free()
233 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow); in avc_xperms_decision_free()
234 if (xpd->dontaudit) in avc_xperms_decision_free()
235 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit); in avc_xperms_decision_free()
296 struct extended_perms_decision *xpd; in avc_xperms_decision_alloc() local
303 xpd = &xpd_node->xpd; in avc_xperms_decision_alloc()
305 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
307 if (!xpd->allowed) in avc_xperms_decision_alloc()
311 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
313 if (!xpd->auditallow) in avc_xperms_decision_alloc()
317 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
319 if (!xpd->dontaudit) in avc_xperms_decision_alloc()
336 avc_copy_xperms_decision(&dest_xpd->xpd, src); in avc_add_xperms_decision()
371 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used); in avc_xperms_populate()
374 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd); in avc_xperms_populate()
387 struct extended_perms_decision *xpd, in avc_xperms_audit_required() argument
397 if (audited && xpd) { in avc_xperms_audit_required()
398 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT)) in avc_xperms_audit_required()
405 if (audited && xpd) { in avc_xperms_audit_required()
406 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW)) in avc_xperms_audit_required()
417 struct extended_perms_decision *xpd, in avc_xperms_audit() argument
424 requested, avd, xpd, perm, result, &denied); in avc_xperms_audit()
833 struct extended_perms_decision *xpd, in avc_update_node() argument
910 rc = avc_add_xperms_decision(node, xpd); in avc_update_node()
1029 struct extended_perms_decision *xpd = NULL; in avc_has_extended_perms() local
1058 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_has_extended_perms()
1059 if (unlikely(!xpd)) { in avc_has_extended_perms()
1076 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd); in avc_has_extended_perms()
1078 xpd = &local_xpd; in avc_has_extended_perms()
1080 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED)) in avc_has_extended_perms()
1092 &avd, xpd, xperm, rc, ad); in avc_has_extended_perms()