函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_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.

函数原型:int tomoyo_init_request_info(struct tomoyo_request_info *r, struct tomoyo_domain_info *domain, const u8 index)

返回类型:int

参数:

类型参数名称
struct tomoyo_request_info *r
struct tomoyo_domain_info *domain
const u8index
1002  memset(r, 0, r的长度)
1003  如果非domaindomain等于moyo_domain - Get "struct tomoyo_domain_info" for current thread.* Returns pointer to "struct tomoyo_domain_info" for current thread.
1005  domain等于domain
1006  profile等于 Profile number to use.
1007  profile等于profile
1008  type等于index
1009  One of tomoyo_mode_index . 等于moyo_get_mode - Get MAC mode.*@ns: Pointer to "struct tomoyo_policy_namespace".*@profile: Profile number.*@index: Index number of functionality.* Returns mode.
1010  返回:One of tomoyo_mode_index .
调用者
名称描述
tomoyo_find_next_domainmoyo_find_next_domain - Find a domain.*@bprm: Pointer to "struct linux_binprm".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_path_number_permmoyo_path_number_perm - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".*@type: Type of operation.*@path: Pointer to "struct path".*@number: Number.* Returns 0 on success, negative value otherwise.
tomoyo_check_open_permissionmoyo_check_open_permission - Check permission for "read" and "write".*@domain: Pointer to "struct tomoyo_domain_info".*@path: Pointer to "struct path".*@flag: Flags for open().* Returns 0 on success, negative value otherwise.
tomoyo_path_permmoyo_path_perm - Check permission for "unlink", "rmdir", "truncate", "symlink", "append", "chroot" and "unmount".*@operation: Type of operation.*@path: Pointer to "struct path".*@target: Symlink's target if @operation is TOMOYO_TYPE_SYMLINK,
tomoyo_mkdev_permmoyo_mkdev_perm - Check permission for "mkblock" and "mkchar".*@operation: Type of operation. (TOMOYO_TYPE_MKCHAR or TOMOYO_TYPE_MKBLOCK)*@path: Pointer to "struct path".*@mode: Create mode.*@dev: Device number.
tomoyo_path2_permmoyo_path2_perm - Check permission for "rename", "link" and "pivot_root".*@operation: Type of operation.*@path1: Pointer to "struct path".*@path2: Pointer to "struct path".* Returns 0 on success, negative value otherwise.
tomoyo_mount_permissionmoyo_mount_permission - Check permission for mount() operation.*@dev_name: Name of device file. Maybe NULL.*@path: Pointer to "struct path".*@type: Name of filesystem type. Maybe NULL.*@flags: Mount options.*@data_page: Optional data. Maybe NULL.
tomoyo_inet_entrymoyo_inet_entry - Check permission for INET network operation.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.
tomoyo_unix_entrymoyo_unix_entry - Check permission for UNIX network operation.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.
tomoyo_write_selfmoyo_write_self - write() for /sys/kernel/security/tomoyo/self_domain interface