Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
domain.c File Reference
#include "common.h"
#include <linux/binfmts.h>
#include <linux/slab.h>

Go to the source code of this file.

Functions

int tomoyo_update_policy (struct tomoyo_acl_head *new_entry, const int size, struct tomoyo_acl_param *param, bool(*check_duplicate)(const struct tomoyo_acl_head *, const struct tomoyo_acl_head *))
 
int tomoyo_update_domain (struct tomoyo_acl_info *new_entry, const int size, struct tomoyo_acl_param *param, bool(*check_duplicate)(const struct tomoyo_acl_info *, const struct tomoyo_acl_info *), bool(*merge_duplicate)(struct tomoyo_acl_info *, struct tomoyo_acl_info *, const bool))
 
void tomoyo_check_acl (struct tomoyo_request_info *r, bool(*check_entry)(struct tomoyo_request_info *, const struct tomoyo_acl_info *))
 
 LIST_HEAD (tomoyo_domain_list)
 
: Domainname to check.

tomoyo_last_word - Get last component of a domainname.

Returns the last word of .

int tomoyo_write_transition_control (struct tomoyo_acl_param *param, const u8 type)
 
int tomoyo_write_aggregator (struct tomoyo_acl_param *param)
 
.

Returns pointer to "struct tomoyo_policy_namespace" if found, NULL otherwise.

Caller holds tomoyo_read_lock().

struct tomoyo_policy_namespacetomoyo_assign_namespace (const char *domainname)
 
struct tomoyo_domain_infotomoyo_assign_domain (const char *domainname, const bool transit)
 
int tomoyo_find_next_domain (struct linux_binprm *bprm)
 
bool tomoyo_dump_page (struct linux_binprm *bprm, unsigned long pos, struct tomoyo_page_dump *dump)
 

Variables

struct tomoyo_domain_info tomoyo_kernel_domain
 

Function Documentation

LIST_HEAD ( tomoyo_domain_list  )
struct tomoyo_domain_info* tomoyo_assign_domain ( const char domainname,
const bool  transit 
)
read

tomoyo_assign_domain - Create a domain or a namespace.

: The name of domain. : True if transit to domain found or created.

Returns pointer to "struct tomoyo_domain_info" on success, NULL otherwise.

Caller holds tomoyo_read_lock().

Definition at line 504 of file domain.c.

struct tomoyo_policy_namespace* tomoyo_assign_namespace ( const char domainname)
read

tomoyo_assign_namespace - Create a new namespace.

: Name of namespace to create.

Returns pointer to "struct tomoyo_policy_namespace" on success, NULL otherwise.

Caller holds tomoyo_read_lock().

Definition at line 445 of file domain.c.

void tomoyo_check_acl ( struct tomoyo_request_info r,
bool(*)(struct tomoyo_request_info *, const struct tomoyo_acl_info *)  check_entry 
)

tomoyo_check_acl - Do permission check.

: Pointer to "struct tomoyo_request_info". : Callback function to check type specific parameters.

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 156 of file domain.c.

bool tomoyo_dump_page ( struct linux_binprm bprm,
unsigned long  pos,
struct tomoyo_page_dump dump 
)

tomoyo_dump_page - Dump a page to buffer.

: Pointer to "struct linux_binprm". : Location to dump. : Poiner to "struct tomoyo_page_dump".

Returns true on success, false otherwise.

Definition at line 864 of file domain.c.

int tomoyo_find_next_domain ( struct linux_binprm bprm)

tomoyo_find_next_domain - Find a domain.

: Pointer to "struct linux_binprm".

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 676 of file domain.c.

int tomoyo_update_domain ( struct tomoyo_acl_info new_entry,
const int  size,
struct tomoyo_acl_param param,
bool(*)(const struct tomoyo_acl_info *, const struct tomoyo_acl_info *)  check_duplicate,
bool(*)(struct tomoyo_acl_info *, struct tomoyo_acl_info *, const bool merge_duplicate 
)

tomoyo_update_domain - Update an entry for domain policy.

: Pointer to "struct tomoyo_acl_info". : Size of in bytes.

Parameters
Pointer to "struct tomoyo_acl_param". : Callback function to find duplicated entry. : Callback function to merge duplicated entry.

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 88 of file domain.c.

int tomoyo_update_policy ( struct tomoyo_acl_head new_entry,
const int  size,
struct tomoyo_acl_param param,
bool(*)(const struct tomoyo_acl_head *, const struct tomoyo_acl_head *)  check_duplicate 
)

tomoyo_update_policy - Update an entry for exception policy.

: Pointer to "struct tomoyo_acl_info". : Size of in bytes.

Parameters
Pointer to "struct tomoyo_acl_param". : Callback function to find duplicated entry.

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 28 of file domain.c.

int tomoyo_write_aggregator ( struct tomoyo_acl_param param)

tomoyo_write_aggregator - Write "struct tomoyo_aggregator" list.

Parameters
Pointer to "struct tomoyo_acl_param".

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 388 of file domain.c.

int tomoyo_write_transition_control ( struct tomoyo_acl_param param,
const u8  type 
)

tomoyo_write_transition_control - Write "struct tomoyo_transition_control" list.

Parameters
Pointer to "struct tomoyo_acl_param". : Type of this entry.

Returns 0 on success, negative value otherwise.

Definition at line 233 of file domain.c.

Variable Documentation

struct tomoyo_domain_info tomoyo_kernel_domain

Definition at line 14 of file domain.c.