Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_file_matches_pattern - Pattern matching without '/' character.*@filename: The start of string to check.*@filename_end: The end of string to check.*@pattern: The start of pattern to compare.*@pattern_end: The end of pattern to compare.

Proto:static bool tomoyo_file_matches_pattern(const char *filename, const char *filename_end, const char *pattern, const char *pattern_end)

Type:bool

Parameter:

TypeParameterName
const char *filename
const char *filename_end
const char *pattern
const char *pattern_end
800  pattern_start = pattern
801  bool first = true
804  When pattern < pattern_end - 1 cycle
806  If pattern++ != '\\' || pattern++ != '-' Then Continue
808  result = moyo_file_matches_pattern2 - Pattern matching without '/' character and "\-" pattern.*@filename: The start of string to check.*@filename_end: The end of string to check.*@pattern: The start of pattern to compare.
812  If first Then result = Not result
814  If result Then Return false
816  first = false
817  pattern_start = pattern
819  result = moyo_file_matches_pattern2 - Pattern matching without '/' character and "\-" pattern.*@filename: The start of string to check.*@filename_end: The end of string to check.*@pattern: The start of pattern to compare.
821  Return If first Then result Else Not result
Caller
NameDescribe
tomoyo_path_matches_pattern2moyo_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.