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

Go to the source code of this file.

Functions

void tomoyo_put_name_union (struct tomoyo_name_union *ptr)
 
matches @ptr, NULL otherwise.
struct tomoyo_path_infotomoyo_compare_name_union (const struct tomoyo_path_info *name, const struct tomoyo_name_union *ptr)
 
void tomoyo_put_number_union (struct tomoyo_number_union *ptr)
 
bool tomoyo_compare_number_union (const unsigned long value, const struct tomoyo_number_union *ptr)
 
int tomoyo_execute_permission (struct tomoyo_request_info *r, const struct tomoyo_path_info *filename)
 
int tomoyo_path_number_perm (const u8 type, struct path *path, unsigned long number)
 
int tomoyo_check_open_permission (struct tomoyo_domain_info *domain, struct path *path, const int flag)
 
int tomoyo_path_perm (const u8 operation, struct path *path, const char *target)
 
int tomoyo_mkdev_perm (const u8 operation, struct path *path, const unsigned int mode, unsigned int dev)
 
int tomoyo_path2_perm (const u8 operation, struct path *path1, struct path *path2)
 
int tomoyo_write_file (struct tomoyo_acl_param *param)
 

Variables

const u8 tomoyo_pnnn2mac [TOMOYO_MAX_MKDEV_OPERATION]
 
const u8 tomoyo_pp2mac [TOMOYO_MAX_PATH2_OPERATION]
 
const u8 tomoyo_pn2mac [TOMOYO_MAX_PATH_NUMBER_OPERATION]
 

Function Documentation

int tomoyo_check_open_permission ( struct tomoyo_domain_info domain,
struct path path,
const int  flag 
)

tomoyo_check_open_permission - Check permission for "read" and "write".

: Pointer to "struct tomoyo_domain_info". : Pointer to "struct path". : Flags for open().

Returns 0 on success, negative value otherwise.

Definition at line 735 of file file.c.

struct tomoyo_path_info* tomoyo_compare_name_union ( const struct tomoyo_path_info name,
const struct tomoyo_name_union ptr 
)
read

Definition at line 81 of file file.c.

bool tomoyo_compare_number_union ( const unsigned long  value,
const struct tomoyo_number_union ptr 
)

tomoyo_compare_number_union - Check whether a value matches "struct tomoyo_number_union" or not.

: Number to check. : Pointer to "struct tomoyo_number_union".

Returns true if matches , false otherwise.

Definition at line 111 of file file.c.

int tomoyo_execute_permission ( struct tomoyo_request_info r,
const struct tomoyo_path_info filename 
)

tomoyo_execute_permission - Check permission for execute operation.

: Pointer to "struct tomoyo_request_info". : Filename to check.

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 587 of file file.c.

int tomoyo_mkdev_perm ( const u8  operation,
struct path path,
const unsigned int  mode,
unsigned int  dev 
)

tomoyo_mkdev_perm - Check permission for "mkblock" and "mkchar".

: Type of operation. (TOMOYO_TYPE_MKCHAR or TOMOYO_TYPE_MKBLOCK) : Pointer to "struct path". : Create mode. : Device number.

Returns 0 on success, negative value otherwise.

Definition at line 841 of file file.c.

int tomoyo_path2_perm ( const u8  operation,
struct path path1,
struct path path2 
)

tomoyo_path2_perm - Check permission for "rename", "link" and "pivot_root".

: Type of operation. : Pointer to "struct path". : Pointer to "struct path".

Returns 0 on success, negative value otherwise.

Definition at line 885 of file file.c.

int tomoyo_path_number_perm ( const u8  type,
struct path path,
unsigned long  number 
)

tomoyo_path_number_perm - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".

: Type of operation. : Pointer to "struct path". : Number.

Returns 0 on success, negative value otherwise.

Definition at line 690 of file file.c.

int tomoyo_path_perm ( const u8  operation,
struct path path,
const char target 
)

tomoyo_path_perm - Check permission for "unlink", "rmdir", "truncate", "symlink", "append", "chroot" and "unmount".

: Type of operation. : Pointer to "struct path". : Symlink's target if is TOMOYO_TYPE_SYMLINK, NULL otherwise.

Returns 0 on success, negative value otherwise.

Definition at line 785 of file file.c.

void tomoyo_put_name_union ( struct tomoyo_name_union ptr)

tomoyo_put_name_union - Drop reference on "struct tomoyo_name_union".

: Pointer to "struct tomoyo_name_union".

Returns nothing.

Definition at line 66 of file file.c.

void tomoyo_put_number_union ( struct tomoyo_number_union ptr)

tomoyo_put_number_union - Drop reference on "struct tomoyo_number_union".

: Pointer to "struct tomoyo_number_union".

Returns nothing.

Definition at line 98 of file file.c.

int tomoyo_write_file ( struct tomoyo_acl_param param)

tomoyo_write_file - Update file related list.

Parameters
Pointer to "struct tomoyo_acl_param".

Returns 0 on success, negative value otherwise.

Caller holds tomoyo_read_lock().

Definition at line 994 of file file.c.

Variable Documentation

Initial value:

Definition at line 30 of file file.c.