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_path_matches_pattern - Check whether the given filename matches the given pattern.*@filename: The filename to check.*@pattern: The pattern to compare.* Returns true if matches, false otherwise.* The following patterns are available.* \\ \ itself.

Proto:bool tomoyo_path_matches_pattern(const struct tomoyo_path_info *filename, const struct tomoyo_path_info *pattern)

Type:bool

Parameter:

TypeParameterName
const struct tomoyo_path_info *filename
const struct tomoyo_path_info *pattern
918  f = name
919  p = name
920  len = = tomoyo_const_part_length(name)
923  If Not = tomoyo_path_contains_pattern(name) Then Return Not moyo_pathcmp - strcmp() for "struct tomoyo_path_info" structure.*@a: Pointer to "struct tomoyo_path_info".*@b: Pointer to "struct tomoyo_path_info".* Returns true if @a == @b, false otherwise.
926  If = tomoyo_strendswith(name, "/") != = tomoyo_strendswith(name, "/") Then Return false
929  If strncmp(f, p, len) Then Return false
931  f += len
932  p += len
933  Return moyo_path_matches_pattern2 - Do pathname pattern matching.*@f: The start of string to check.*@p: The start of pattern to compare.* Returns true if @f matches @p, false otherwise.
Caller
NameDescribe
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_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_check_env_aclmoyo_check_env_acl - Check permission for environment variable's name.*@r: Pointer to "struct tomoyo_request_info".*@ptr: Pointer to "struct tomoyo_acl_info".* Returns true if granted, false otherwise.
tomoyo_compare_name_unionmoyo_compare_name_union - Check whether a name matches "struct tomoyo_name_union" or not.*@name: Pointer to "struct tomoyo_path_info".*@ptr: Pointer to "struct tomoyo_name_union".* Returns "struct tomoyo_path_info" if @name matches @ptr, NULL otherwise.
tomoyo_path_matches_groupmoyo_path_matches_group - Check whether the given pathname matches members of the given pathname group
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.