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

Go to the source code of this file.

Macros

#define AA_CLASS_ENTRY   0
 
#define AA_CLASS_UNKNOWN   1
 
#define AA_CLASS_FILE   2
 
#define AA_CLASS_CAP   3
 
#define AA_CLASS_NET   4
 
#define AA_CLASS_RLIMITS   5
 
#define AA_CLASS_DOMAIN   6
 
#define AA_CLASS_LAST   AA_CLASS_DOMAIN
 
#define AA_DEBUG(fmt, args...)
 
#define AA_ERROR(fmt, args...)
 

Functions

charaa_split_fqname (char *args, char **ns_name)
 
void aa_info_message (const char *str)
 
voidkvmalloc (size_t size)
 
void kvfree (void *buffer)
 

Variables

enum audit_mode aa_g_audit
 
bool aa_g_audit_header
 
bool aa_g_debug
 
bool aa_g_lock_policy
 
bool aa_g_logsyscall
 
bool aa_g_paranoid_load
 
unsigned int aa_g_path_max
 
int apparmor_initialized __initdata
 

Macro Definition Documentation

#define AA_CLASS_CAP   3

Definition at line 28 of file apparmor.h.

#define AA_CLASS_DOMAIN   6

Definition at line 31 of file apparmor.h.

#define AA_CLASS_ENTRY   0

Definition at line 25 of file apparmor.h.

#define AA_CLASS_FILE   2

Definition at line 27 of file apparmor.h.

#define AA_CLASS_LAST   AA_CLASS_DOMAIN

Definition at line 33 of file apparmor.h.

#define AA_CLASS_NET   4

Definition at line 29 of file apparmor.h.

#define AA_CLASS_RLIMITS   5

Definition at line 30 of file apparmor.h.

#define AA_CLASS_UNKNOWN   1

Definition at line 26 of file apparmor.h.

#define AA_DEBUG (   fmt,
  args... 
)
Value:
do { \
if (aa_g_debug && printk_ratelimit()) \
printk(KERN_DEBUG "AppArmor: " fmt, ##args); \
} while (0)

Definition at line 49 of file apparmor.h.

#define AA_ERROR (   fmt,
  args... 
)
Value:
do { \
if (printk_ratelimit()) \
printk(KERN_ERR "AppArmor: " fmt, ##args); \
} while (0)

Definition at line 55 of file apparmor.h.

Function Documentation

void aa_info_message ( const char str)

aa_info_message - log a none profile related status message : message to log

Definition at line 64 of file lib.c.

char* aa_split_fqname ( char fqname,
char **  ns_name 
)

aa_split_fqname - split a fqname into a profile and namespace name : a full qualified name in namespace profile format (NOT NULL) : pointer to portion of the string containing the ns name (NOT NULL)

Returns: profile name or NULL if one is not specified

Split a namespace name from a profile name (see policy.c for naming description). If a portion of the name is missing it returns NULL for that portion.

NOTE: may modify the string. The pointers returned point into the string.

Definition at line 38 of file lib.c.

void kvfree ( void buffer)

kvfree - free an allocation do by kvmalloc : buffer to free (MAYBE_NULL)

Free a buffer allocated by kvmalloc

Definition at line 126 of file lib.c.

void* kvmalloc ( size_t  size)

kvmalloc - do allocation preferring kmalloc but falling back to vmalloc : size of allocation

Return: allocated buffer or NULL if failed

It is possible that policy being loaded from the user is larger than what can be allocated by kmalloc, in those cases fall back to vmalloc.

Definition at line 86 of file lib.c.

Variable Documentation

int apparmor_initialized __initdata

Definition at line 86 of file setup.c.

enum audit_mode aa_g_audit

Definition at line 710 of file lsm.c.

bool aa_g_audit_header

Definition at line 717 of file lsm.c.

bool aa_g_debug

Definition at line 706 of file lsm.c.

bool aa_g_lock_policy

Definition at line 725 of file lsm.c.

bool aa_g_logsyscall

Definition at line 730 of file lsm.c.

bool aa_g_paranoid_load

Definition at line 740 of file lsm.c.

unsigned int aa_g_path_max

Definition at line 734 of file lsm.c.