Lines Matching refs:xpd

62 	struct extended_perms_decision xpd;
191 if (xpd_node->xpd.driver == driver)
192 return &xpd_node->xpd;
198 avc_xperms_has_perm(struct extended_perms_decision *xpd,
204 (xpd->used & XPERMS_ALLOWED))
205 rc = security_xperm_test(xpd->allowed->p, perm);
207 (xpd->used & XPERMS_AUDITALLOW))
208 rc = security_xperm_test(xpd->auditallow->p, perm);
210 (xpd->used & XPERMS_DONTAUDIT))
211 rc = security_xperm_test(xpd->dontaudit->p, perm);
218 struct extended_perms_decision *xpd;
220 xpd = avc_xperms_decision_lookup(driver, xp_node);
221 if (xpd && xpd->allowed)
222 security_xperm_set(xpd->allowed->p, perm);
227 struct extended_perms_decision *xpd;
229 xpd = &xpd_node->xpd;
230 if (xpd->allowed)
231 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed);
232 if (xpd->auditallow)
233 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow);
234 if (xpd->dontaudit)
235 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit);
296 struct extended_perms_decision *xpd;
303 xpd = &xpd_node->xpd;
305 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep,
307 if (!xpd->allowed)
311 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep,
313 if (!xpd->auditallow)
317 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep,
319 if (!xpd->dontaudit)
337 avc_copy_xperms_decision(&dest_xpd->xpd, src);
369 /* for each source xpd allocate a destination xpd and copy */
371 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used);
374 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd);
387 struct extended_perms_decision *xpd,
397 if (audited && xpd) {
398 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT))
405 if (audited && xpd) {
406 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW))
417 struct extended_perms_decision *xpd,
424 requested, avd, xpd, perm, result, &denied);
823 * @xpd: extended_perms_decision to be added to the node
833 struct extended_perms_decision *xpd,
910 avc_add_xperms_decision(node, xpd);
1025 struct extended_perms_decision *xpd = NULL;
1054 xpd = avc_xperms_decision_lookup(driver, xp_node);
1055 if (unlikely(!xpd)) {
1072 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd);
1074 xpd = &local_xpd;
1076 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED))
1088 &avd, xpd, xperm, rc, ad);