Lines Matching full:resource

5  * This file contains AppArmor resource mediation and attachment
16 #include "include/resource.h"
20 * Table of rlimit names: we generate it from resource.h.
29 /* audit callback for resource specific fields */
45 * audit_resource - audit setting resource limit
46 * @subj_cred: cred setting the resource
48 * @resource: rlimit being auditing
57 struct aa_profile *profile, unsigned int resource, in audit_resource() argument
65 ad.rlim.rlim = resource; in audit_resource()
75 * aa_map_resource - map compiled policy resource to internal #
76 * @resource: flattened policy resource number
78 * Returns: resource # for the current architecture.
80 * rlimit resource can vary based on architecture, map the compiled policy
81 * resource # to the internal representation for the architecture.
83 int aa_map_resource(int resource) in aa_map_resource() argument
85 return rlim_map[resource]; in aa_map_resource()
89 struct aa_profile *profile, unsigned int resource, in profile_setrlimit() argument
96 if (rules->rlimits.mask & (1 << resource) && new_rlim->rlim_max > in profile_setrlimit()
97 rules->rlimits.limits[resource].rlim_max) in profile_setrlimit()
99 return audit_resource(subj_cred, profile, resource, new_rlim->rlim_max, in profile_setrlimit()
107 * @task: task the resource is being set on
108 * @resource: the resource being set
109 * @new_rlim: the new resource limit (NOT NULL)
113 * Returns: 0 or error code if setting resource failed
117 unsigned int resource, struct rlimit *new_rlim) in aa_task_setrlimit() argument
127 /* TODO: extend resource control to handle other (non current) in aa_task_setrlimit()
129 * that the task is setting the resource of a task confined with in aa_task_setrlimit()
130 * the same profile or that the task setting the resource of another in aa_task_setrlimit()
137 audit_resource(subj_cred, profile, resource, in aa_task_setrlimit()
142 profile_setrlimit(subj_cred, profile, resource, in aa_task_setrlimit()