Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
resource.h File Reference
#include <linux/resource.h>
#include <linux/sched.h>
#include "apparmorfs.h"

Go to the source code of this file.

Data Structures

struct  aa_rlimit
 

Functions

int aa_map_resource (int resource)
 
int aa_task_setrlimit (struct aa_profile *profile, struct task_struct *, unsigned int resource, struct rlimit *new_rlim)
 
void __aa_transition_rlimits (struct aa_profile *old, struct aa_profile *new)
 

Variables

struct aa_fs_entry aa_fs_entry_rlimit []
 

Function Documentation

void __aa_transition_rlimits ( struct aa_profile old,
struct aa_profile new 
)

__aa_transition_rlimits - apply new profile rlimits : old profile on task (NOT NULL) : new profile with rlimits to apply (NOT NULL)

Definition at line 112 of file resource.c.

int aa_map_resource ( int  resource)

aa_map_resouce - map compiled policy resource to internal # : flattened policy resource number

Returns: resource # for the current architecture.

rlimit resource can vary based on architecture, map the compiled policy resource # to the internal representation for the architecture.

Definition at line 74 of file resource.c.

int aa_task_setrlimit ( struct aa_profile profile,
struct task_struct task,
unsigned int  resource,
struct rlimit new_rlim 
)

aa_task_setrlimit - test permission to set an rlimit - profile confining the task (NOT NULL) - task the resource is being set on - the resource being set - the new resource limit (NOT NULL)

Control raising the processes hard limit.

Returns: 0 or error code if setting resource failed

Definition at line 90 of file resource.c.

Variable Documentation

struct aa_fs_entry aa_fs_entry_rlimit[]

Definition at line 26 of file resource.c.