Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\util.c Create Date:2022-07-28 19:48:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_get_mode - Get MAC mode.*@ns: Pointer to "struct tomoyo_policy_namespace".*@profile: Profile number.*@index: Index number of functionality.* Returns mode.

Proto:int tomoyo_get_mode(const struct tomoyo_policy_namespace *ns, const u8 profile, const u8 index)

Type:int

Parameter:

TypeParameterName
const struct tomoyo_policy_namespace *ns
const u8profile
const u8index
976  If Not Has /sbin/init started? Then Return TOMOYO_CONFIG_DISABLED
978  p = moyo_profile - Find a profile.*@ns: Pointer to "struct tomoyo_policy_namespace".*@profile: Profile number to find.* Returns pointer to "struct tomoyo_profile".
979  mode = config[index]
980  If mode == TOMOYO_CONFIG_USE_DEFAULT Then mode = config[Mapping table from "enum tomoyo_mac_index" to* "enum tomoyo_mac_category_index".[index] + TOMOYO_MAX_MAC_INDEX]
983  If mode == TOMOYO_CONFIG_USE_DEFAULT Then mode = default_config
985  Return mode & 3
Caller
NameDescribe
tomoyo_path_permissionmoyo_path_permission - Check permission for single path operation.*@r: Pointer to "struct tomoyo_request_info".*@operation: Type of operation.*@filename: Filename to check.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_execute_permissionmoyo_execute_permission - Check permission for execute operation.*@r: Pointer to "struct tomoyo_request_info".*@filename: Filename to check.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_init_request_infomoyo_init_request_info - Initialize "struct tomoyo_request_info" members.*@r: Pointer to "struct tomoyo_request_info" to initialize.*@domain: Pointer to "struct tomoyo_domain_info". NULL for tomoyo_domain().*@index: Index number of functionality.
tomoyo_environmoyo_environ - Check permission for environment variable names.*@ee: Pointer to "struct tomoyo_execve".* Returns 0 on success, negative value otherwise.