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

Go to the source code of this file.

Functions

int tomoyo_write_group (struct tomoyo_acl_param *param, const u8 type)
 
struct tomoyo_path_infotomoyo_path_matches_group (const struct tomoyo_path_info *pathname, const struct tomoyo_group *group)
 
bool tomoyo_number_matches_group (const unsigned long min, const unsigned long max, const struct tomoyo_group *group)
 
bool tomoyo_address_matches_group (const bool is_ipv6, const __be32 *address, const struct tomoyo_group *group)
 

Function Documentation

bool tomoyo_address_matches_group ( const bool  is_ipv6,
const __be32 address,
const struct tomoyo_group group 
)

tomoyo_address_matches_group - Check whether the given address matches members of the given address group.

: True if is an IPv6 address. : An IPv4 or IPv6 address. : Pointer to "struct tomoyo_address_group".

Returns true if matches addresses in group, false otherwise.

Caller holds tomoyo_read_lock().

Definition at line 179 of file group.c.

bool tomoyo_number_matches_group ( const unsigned long  min,
const unsigned long  max,
const struct tomoyo_group group 
)

tomoyo_number_matches_group - Check whether the given number matches members of the given number group.

: Min number. : Max number. : Pointer to "struct tomoyo_number_group".

Returns true if and partially overlaps , false otherwise.

Caller holds tomoyo_read_lock().

Definition at line 150 of file group.c.

struct tomoyo_path_info* tomoyo_path_matches_group ( const struct tomoyo_path_info pathname,
const struct tomoyo_group group 
)
read

tomoyo_path_matches_group - Check whether the given pathname matches members of the given pathname group.

: The name of pathname. : Pointer to "struct tomoyo_path_group".

Returns matched member's pathname if matches pathnames in , NULL otherwise.

Caller holds tomoyo_read_lock().

Definition at line 125 of file group.c.

int tomoyo_write_group ( struct tomoyo_acl_param param,
const u8  type 
)

tomoyo_write_group - Write "struct tomoyo_path_group"/"struct tomoyo_number_group"/"struct tomoyo_address_group" list.

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

Returns 0 on success, negative value otherwise.

Definition at line 71 of file group.c.