Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_fill_path_info - Fill in "struct tomoyo_path_info" members.*@ptr: Pointer to "struct tomoyo_path_info" to fill in.* The caller sets "struct tomoyo_path_info"->name.

Proto:void tomoyo_fill_path_info(struct tomoyo_path_info *ptr)

Type:void

Parameter:

TypeParameterName
struct tomoyo_path_info *ptr
657  name = name
658  len = strlen - Find the length of a string*@s: The string to be sized
660  = tomoyo_const_part_length(name) = moyo_const_part_length - Evaluate the initial length without a pattern in a token.*@filename: The string to evaluate.* Returns the initial length without a pattern in @filename.
661  = tomoyo_strendswith(name, "/") = len && name[len - 1] == '/'
662  = tomoyo_path_contains_pattern(name) = = tomoyo_const_part_length(name) < len
663  = full_name_hash(name, strlen(name)) = Version 2: One word (32 or 64 bits) at a time.* If CONFIG_DCACHE_WORD_ACCESS is defined (meaning * exists, which describes major Linux platforms like x86 and ARM), then* this computes a different hash function much faster.
Caller
NameDescribe
tomoyo_argvmoyo_argv - Check argv[] in "struct linux_binbrm".*@index: Index number of @arg_ptr.*@arg_ptr: Contents of argv[@index].*@argc: Length of @argv.*@argv: Pointer to "struct tomoyo_argv".*@checked: Set to true if @argv[@index] was found.
tomoyo_envpmoyo_envp - Check envp[] in "struct linux_binbrm".*@env_name: The name of environment variable.*@env_value: The value of environment variable.*@envc: Length of @envp.*@envp: Pointer to "struct tomoyo_envp".
tomoyo_scan_exec_realpathmoyo_scan_exec_realpath - Check "exec.realpath" parameter of "struct tomoyo_condition".*@file: Pointer to "struct file".*@ptr: Pointer to "struct tomoyo_name_union".*@match: True if "exec.realpath=", false if "exec.realpath!=".
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_env_permmoyo_env_perm - Check permission for environment variable's name.*@r: Pointer to "struct tomoyo_request_info".*@env: The name of environment variable.* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().
tomoyo_add_slashmoyo_add_slash - Add trailing '/' if needed.*@buf: Pointer to "struct tomoyo_path_info".* Returns nothing.*@buf must be generated by tomoyo_encode() because this function does not* allocate memory for adding '/'.
tomoyo_get_realpathmoyo_get_realpath - Get realpath.*@buf: Pointer to "struct tomoyo_path_info".*@path: Pointer to "struct path".* Returns true on success, false 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_get_namemoyo_get_name - Allocate permanent memory for string data.*@name: The string to store into the permernent memory.* Returns pointer to "struct tomoyo_path_info" on success, NULL otherwise.
tomoyo_mount_aclmoyo_mount_acl - Check permission for mount() operation.*@r: Pointer to "struct tomoyo_request_info".*@dev_name: Name of device file. Maybe NULL.*@dir: Pointer to "struct path".*@type: Name of filesystem type.*@flags: Mount options.
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
tomoyo_find_domainmoyo_find_domain - Find a domain by the given name.*@domainname: The domainname to find.* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.* Caller holds tomoyo_read_lock().