函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_fill_rule - Fill Smack rule from strings*@subject: subject label string*@object: object label string*@access1: access string*@access2: string with permissions to be removed*@rule: Smack rule*@import: if non-zero, import labels*@len: label length limit

函数原型:static int smk_fill_rule(const char *subject, const char *object, const char *access1, const char *access2, struct smack_parsed_rule *rule, int import, int len)

返回类型:int

参数:

类型参数名称
const char *subject
const char *object
const char *access1
const char *access2
struct smack_parsed_rule *rule
intimport
intlen
322  如果import
323  smk_subject等于smk_import_entry - import a label, return the list entry*@string: a text string that might be a Smack label*@len: the maximum size, or zero if it is NULL terminated
324  如果是错误则返回:错误
327  smk_object等于smk_import_entry - import a label, return the list entry*@string: a text string that might be a Smack label*@len: the maximum size, or zero if it is NULL terminated
328  如果是错误则返回:错误
330  否则
331  cp等于smk_parse_smack - parse smack label from a text string*@string: a text string that might contain a Smack label*@len: the maximum size, or zero if it is NULL terminated.* Returns a pointer to the clean label or an error code.
332  如果是错误则返回:错误
334  skp等于smk_find_entry - find a label on the list, return the list entry*@string: a text string that might be a Smack label* Returns a pointer to the entry in the label list that* matches the passed string or NULL if not found.
335  释放内存
336  如果(skp == NULL)则返回:负ENOENT
338  smk_subject等于skp
340  cp等于smk_parse_smack - parse smack label from a text string*@string: a text string that might contain a Smack label*@len: the maximum size, or zero if it is NULL terminated.* Returns a pointer to the clean label or an error code.
341  如果是错误则返回:错误
343  skp等于smk_find_entry - find a label on the list, return the list entry*@string: a text string that might be a Smack label* Returns a pointer to the entry in the label list that* matches the passed string or NULL if not found.
344  释放内存
345  如果(skp == NULL)则返回:负ENOENT
347  smk_object等于skp
350  smk_access1等于smk_perm_from_str - parse smack accesses from a text string*@string: a text string that contains a Smack accesses code* Returns an integer with respective bits set for specified accesses.
351  如果access2smk_access2等于smk_perm_from_str - parse smack accesses from a text string*@string: a text string that contains a Smack accesses code* Returns an integer with respective bits set for specified accesses.
353  否则smk_access2等于smk_access1的反
356  返回:0
调用者
名称描述
smk_parse_rulesmk_parse_rule - parse Smack rule from load string*@data: string to be parsed whose size is SMK_LOADLEN*@rule: Smack rule*@import: if non-zero, import labels* Returns 0 on success, -1 on errors.
smk_parse_long_rulesmk_parse_long_rule - parse Smack rule from rule string*@data: string to be parsed, null terminated*@rule: Will be filled with Smack parsed rule*@import: if non-zero, import labels*@tokens: numer of substrings expected in data