Lines Matching refs:profile
31 struct aa_profile *profile; member
61 static int audit_caps(struct aa_profile *profile, struct task_struct *task, in audit_caps() argument
77 if (likely((AUDIT_MODE(profile) != AUDIT_ALL) && in audit_caps()
78 !cap_raised(profile->caps.audit, cap))) in audit_caps()
81 } else if (KILL_MODE(profile) || in audit_caps()
82 cap_raised(profile->caps.kill, cap)) { in audit_caps()
84 } else if (cap_raised(profile->caps.quiet, cap) && in audit_caps()
85 AUDIT_MODE(profile) != AUDIT_NOQUIET && in audit_caps()
86 AUDIT_MODE(profile) != AUDIT_ALL) { in audit_caps()
93 if (profile == ent->profile && cap_raised(ent->caps, cap)) { in audit_caps()
95 if (COMPLAIN_MODE(profile)) in audit_caps()
99 aa_put_profile(ent->profile); in audit_caps()
100 ent->profile = aa_get_profile(profile); in audit_caps()
105 return aa_audit(type, profile, GFP_ATOMIC, &sa, audit_cb); in audit_caps()
115 static int profile_capable(struct aa_profile *profile, int cap) in profile_capable() argument
117 return cap_raised(profile->caps.allow, cap) ? 0 : -EPERM; in profile_capable()
131 int aa_capable(struct task_struct *task, struct aa_profile *profile, int cap, in aa_capable() argument
134 int error = profile_capable(profile, cap); in aa_capable()
137 if (COMPLAIN_MODE(profile)) in aa_capable()
142 return audit_caps(profile, task, cap, error); in aa_capable()