• Home
  • Raw
  • Download

Lines Matching full:resource

4  * This file contains AppArmor resource mediation and attachment
20 #include "include/resource.h"
24 * Table of rlimit names: we generate it from resource.h.
33 /* audit callback for resource specific fields */
48 * audit_resource - audit setting resource limit
50 * @resource: rlimit being auditing
56 static int audit_resource(struct aa_profile *profile, unsigned int resource, in audit_resource() argument
62 aad(&sa)->rlim.rlim = resource; in audit_resource()
72 * aa_map_resouce - map compiled policy resource to internal #
73 * @resource: flattened policy resource number
75 * Returns: resource # for the current architecture.
77 * rlimit resource can vary based on architecture, map the compiled policy
78 * resource # to the internal representation for the architecture.
80 int aa_map_resource(int resource) in aa_map_resource() argument
82 return rlim_map[resource]; in aa_map_resource()
85 static int profile_setrlimit(struct aa_profile *profile, unsigned int resource, in profile_setrlimit() argument
90 if (profile->rlimits.mask & (1 << resource) && new_rlim->rlim_max > in profile_setrlimit()
91 profile->rlimits.limits[resource].rlim_max) in profile_setrlimit()
93 return audit_resource(profile, resource, new_rlim->rlim_max, NULL, NULL, in profile_setrlimit()
100 * @task - task the resource is being set on
101 * @resource - the resource being set
102 * @new_rlim - the new resource limit (NOT NULL)
106 * Returns: 0 or error code if setting resource failed
109 unsigned int resource, struct rlimit *new_rlim) in aa_task_setrlimit() argument
119 /* TODO: extend resource control to handle other (non current) in aa_task_setrlimit()
121 * that the task is setting the resource of a task confined with in aa_task_setrlimit()
122 * the same profile or that the task setting the resource of another in aa_task_setrlimit()
129 audit_resource(profile, resource, in aa_task_setrlimit()
134 profile_setrlimit(profile, resource, new_rlim)); in aa_task_setrlimit()