函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static ssize_t smk_parse_long_rule(char *data, struct smack_parsed_rule *rule, int import, int tokens)

返回类型:ssize_t

参数:

类型参数名称
char *data
struct smack_parsed_rule *rule
intimport
inttokens
390  cnt等于0
398 i小于tokens循环
399 Note: isspace() must return false for %NUL-terminator (data[cnt])循环
400  data[cnt++]等于'\0'
402  如果data[cnt]恒等于'\0'则返回:负EINVAL
406  tok[i]等于datacnt
408 data[cnt]且非Note: isspace() must return false for %NUL-terminator (data[cnt])循环
409  cnt先自加
411 Note: isspace() must return false for %NUL-terminator (data[cnt])循环
412  data[cnt++]等于'\0'
414 i小于4循环
415  tok[i++] = NULL
417  rc等于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
418  返回:如果rc恒等于0则cnt否则rc
调用者
名称描述
smk_write_rules_listsmk_write_rules_list - write() for any /smack rule file*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start - must be 0*@rule_list: the list of rules to write to*@rule_lock: lock for the rule
smk_user_accesssmk_user_access - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0