Linux Kernel
3.7.1
|
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/err.h>
#include <linux/kref.h>
#include "include/apparmor.h"
#include "include/match.h"
Go to the source code of this file.
Functions | |
void | aa_dfa_free_kref (struct kref *kref) |
struct aa_dfa * | aa_dfa_unpack (void *blob, size_t size, int flags) |
unsigned int | aa_dfa_match_len (struct aa_dfa *dfa, unsigned int start, const char *str, int len) |
unsigned int | aa_dfa_match (struct aa_dfa *dfa, unsigned int start, const char *str) |
unsigned int | aa_dfa_next (struct aa_dfa *dfa, unsigned int state, const char c) |
aa_dfa_match - traverse to find state stops at : the dfa to match against (NOT NULL) : the state of the dfa to start matching in : the null terminated string of bytes to match against the dfa (NOT NULL)
aa_dfa_match will match against the dfa and return the state it finished matching in. The final state can be used to look up the accepting label, or as the start state of a continuing match.
Returns: final state reached after input is consumed
unsigned int aa_dfa_match_len | ( | struct aa_dfa * | dfa, |
unsigned int | start, | ||
const char * | str, | ||
int | len | ||
) |
aa_dfa_match_len - traverse to find state stops at : the dfa to match against (NOT NULL) : the state of the dfa to start matching in : the string of bytes to match against the dfa (NOT NULL) : length of the string of bytes to match
aa_dfa_match_len will match against the dfa and return the state it finished matching in. The final state can be used to look up the accepting label, or as the start state of a continuing match.
This function will happily match again the 0 byte and only finishes when input is consumed.
Returns: final state reached after input is consumed
aa_dfa_unpack - unpack the binary tables of a serialized dfa : aligned serialized stream of data to unpack (NOT NULL) : size of data to unpack : flags controlling what type of accept tables are acceptable
Unpack a dfa that has been serialized. To find information on the dfa format look in Documentation/security/apparmor.txt Assumes the dfa stream has been aligned on a 8 byte boundary
Returns: an unpacked dfa ready for matching or ERR_PTR on failure