Lines Matching defs:xpd
62 struct extended_perms_decision xpd;
193 if (xpd_node->xpd.driver == driver)
194 return &xpd_node->xpd;
200 avc_xperms_has_perm(struct extended_perms_decision *xpd,
206 (xpd->used & XPERMS_ALLOWED))
207 rc = security_xperm_test(xpd->allowed->p, perm);
209 (xpd->used & XPERMS_AUDITALLOW))
210 rc = security_xperm_test(xpd->auditallow->p, perm);
212 (xpd->used & XPERMS_DONTAUDIT))
213 rc = security_xperm_test(xpd->dontaudit->p, perm);
220 struct extended_perms_decision *xpd;
222 xpd = avc_xperms_decision_lookup(driver, xp_node);
223 if (xpd && xpd->allowed)
224 security_xperm_set(xpd->allowed->p, perm);
229 struct extended_perms_decision *xpd;
231 xpd = &xpd_node->xpd;
232 if (xpd->allowed)
233 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed);
234 if (xpd->auditallow)
235 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow);
236 if (xpd->dontaudit)
237 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit);
298 struct extended_perms_decision *xpd;
305 xpd = &xpd_node->xpd;
307 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep,
309 if (!xpd->allowed)
313 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep,
315 if (!xpd->auditallow)
319 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep,
321 if (!xpd->dontaudit)
339 avc_copy_xperms_decision(&dest_xpd->xpd, src);
371 /* for each source xpd allocate a destination xpd and copy */
373 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used);
376 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd);
389 struct extended_perms_decision *xpd,
399 if (audited && xpd) {
400 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT))
407 if (audited && xpd) {
408 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW))
420 struct extended_perms_decision *xpd,
427 requested, avd, xpd, perm, result, &denied);
828 * @xpd: extended_perms_decision to be added to the node
839 struct extended_perms_decision *xpd,
930 avc_add_xperms_decision(node, xpd);
1048 struct extended_perms_decision *xpd = NULL;
1077 xpd = avc_xperms_decision_lookup(driver, xp_node);
1078 if (unlikely(!xpd)) {
1095 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd);
1097 xpd = &local_xpd;
1099 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED))
1111 &avd, xpd, xperm, rc, ad);