函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\file.c Create Date:2022-07-27 21:11:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_write_file - Update file related list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().

函数原型:int tomoyo_write_file(struct tomoyo_acl_param *param)

返回类型:int

参数:

类型参数名称
struct tomoyo_acl_param *param
1014  perm等于0
1016  operation等于tomoyo_read_token(param)
1018 type小于TOMOYO_MAX_PATH_OPERATION循环如果tomoyo_permstr(operation, String table for path operation. [type])则
1020  perm或等于1左移type
1021  如果perm则返回:moyo_update_path_acl - Update "struct tomoyo_path_acl" list.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1023 type小于TOMOYO_MAX_PATH2_OPERATION循环如果tomoyo_permstr(operation, String table for /sys/kernel/security/tomoyo/profile [Mapping table from "enum tomoyo_path2_acl_index" to "enum tomoyo_mac_index".[type]])则
1026  perm或等于1左移type
1027  如果perm则返回:moyo_update_path2_acl - Update "struct tomoyo_path2_acl" list.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1029 type小于TOMOYO_MAX_PATH_NUMBER_OPERATION循环如果tomoyo_permstr(operation, String table for /sys/kernel/security/tomoyo/profile [Mapping table from "enum tomoyo_path_number_acl_index" to* "enum tomoyo_mac_index".[type]])则
1032  perm或等于1左移type
1033  如果perm则返回:moyo_update_path_number_acl - Update ioctl/chmod/chown/chgrp ACL.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.
1035 type小于TOMOYO_MAX_MKDEV_OPERATION循环如果tomoyo_permstr(operation, String table for /sys/kernel/security/tomoyo/profile [Mapping table from "enum tomoyo_mkdev_acl_index" to "enum tomoyo_mac_index".[type]])则
1038  perm或等于1左移type
1039  如果perm则返回:moyo_update_mkdev_acl - Update "struct tomoyo_mkdev_acl" list.*@perm: Permission.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1041  如果tomoyo_permstr(operation, String table for /sys/kernel/security/tomoyo/profile [TOMOYO_MAC_FILE_MOUNT])则返回:moyo_update_mount_acl - Write "struct tomoyo_mount_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
1044  返回:负EINVAL