Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
lib.c File Reference
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include "include/audit.h"
#include "include/apparmor.h"

Go to the source code of this file.

Functions

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

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.