Function report |
Source Code:security\tomoyo\common.c |
Create Date:2022-07-28 19:36:39 |
Last Modify:2020-03-18 09:15:18 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_supervisor - Ask for the supervisor's decision
Proto:int tomoyo_supervisor(struct tomoyo_request_info *r, const char *fmt, ...)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct tomoyo_request_info * | r | |
const char * | fmt |
2065 | struct tomoyo_query entry = {} |
2066 | bool quota_exceeded = false |
2076 | If granted Then Return 0 |
2078 | If One of tomoyo_mode_index . Then moyo_update_stat - Update statistic counters.*@index: Index for policy type.* Returns nothing. |
2081 | Case One of tomoyo_mode_index . == TOMOYO_CONFIG_ENFORCING |
2083 | If atomic_read( & Number of "struct file" referring /sys/kernel/security/tomoyo/query* interface.) Then Break |
2085 | Go to out |
2086 | Case One of tomoyo_mode_index . == TOMOYO_CONFIG_LEARNING |
2087 | error = 0 |
2092 | Default |
2093 | Return 0 |
2102 | If Not error Then |
2104 | Go to out |
2106 | len = moyo_round2 - Round up to power of 2 for calculating memory usage.*@size: Size to be rounded up.* Returns @size.* Since SLOB does not round up, this function simply returns @size. |
2109 | If tomoyo_memory_quota[TOMOYO_MEMORY_QUERY] && tomoyo_memory_used[TOMOYO_MEMORY_QUERY] + len >= tomoyo_memory_quota[TOMOYO_MEMORY_QUERY] Then |
2112 | quota_exceeded = true |
2113 | Else |
2114 | serial = tomoyo_serial++ |
2116 | tomoyo_memory_used[TOMOYO_MEMORY_QUERY] += len |
2120 | If quota_exceeded Then Go to out |
2129 | timer++ |
2133 | tomoyo_memory_used[TOMOYO_MEMORY_QUERY] -= len |
2136 | Case answer == 3 |
2138 | retry++ |
2139 | Break |
2140 | Case answer == 1 |
2142 | error = 0 |
2143 | Break |
2144 | Default |
2146 | Break |
2148 | out : |
2150 | Return error |
Name | Describe |
---|---|
tomoyo_audit_env_log | moyo_audit_env_log - Audit environment variable name log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_path_log | moyo_audit_path_log - Audit path request log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_path2_log | moyo_audit_path2_log - Audit path/path request log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_mkdev_log | moyo_audit_mkdev_log - Audit path/number/number/number request log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_path_number_log | moyo_audit_path_number_log - Audit path/number request log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_mount_log | moyo_audit_mount_log - Audit mount log.*@r: Pointer to "struct tomoyo_request_info".* Returns 0 on success, negative value otherwise. |
tomoyo_audit_net_log | moyo_audit_net_log - Audit network log.*@r: Pointer to "struct tomoyo_request_info".*@family: Name of socket family ("inet" or "unix").*@protocol: Name of protocol in @family.*@operation: Name of socket operation.*@address: Name of address. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |