函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\common.c Create Date:2022-07-27 21:04:22
Last Modify:2020-03-18 09:15:18 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_write_domain2 - Write domain policy.*@ns: Pointer to "struct tomoyo_policy_namespace".*@list: Pointer to "struct list_head".*@data: Policy to be interpreted.*@is_delete: True if it is a delete request.* Returns 0 on success, negative value otherwise.

函数原型:static int tomoyo_write_domain2(struct tomoyo_policy_namespace *ns, struct list_head *list, char *data, const bool is_delete)

返回类型:int

参数:

类型参数名称
struct tomoyo_policy_namespace *ns
struct list_head *list
char *data
const boolis_delete
1130  struct tomoyo_acl_param param = {ns = ns, list = list, data = data, is_delete = is_delete, }
1136  static const struct{const char * keyword;int( * write)(struct tomoyo_acl_param * param)}tomoyo_callback[5] = {{"file ", tomoyo_write_file}, {"network inet ", moyo_write_inet_network - Write "struct tomoyo_inet_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().}, {"network unix ", tomoyo_write_unix_network}, {"misc ", tomoyo_write_misc}, {"task ", moyo_write_task - Update task related list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().}, }
1148 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(tomoyo_callback)循环
1149  如果非tomoyo_str_starts( & data, keyword)则继续下一循环
1152  返回:write( & param)
1154  返回:负EINVAL
调用者
名称描述
tomoyo_write_domainmoyo_write_domain - Write domain policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_write_exceptionmoyo_write_exception - Write exception policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_add_entrymoyo_add_entry - Add an ACL to current thread's domain. Used by learning mode.*@domain: Pointer to "struct tomoyo_domain_info".*@header: Lines containing ACL.* Returns nothing.