Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static ssize_t smk_parse_long_rule(char *data, struct smack_parsed_rule *rule, int import, int tokens)

Type:ssize_t

Parameter:

TypeParameterName
char *data
struct smack_parsed_rule *rule
intimport
inttokens
390  cnt = 0
398  When i < tokens cycle
399  When Note: isspace() must return false for %NUL-terminator (data[cnt]) cycle
400  data[cnt++] = '\0'
402  If data[cnt] == '\0' Then Return -EINVAL
406  tok[i] = data + cnt
408  When data[cnt] && Not Note: isspace() must return false for %NUL-terminator (data[cnt]) cycle
409  ++cnt
411  When Note: isspace() must return false for %NUL-terminator (data[cnt]) cycle
412  data[cnt++] = '\0'
414  When i < 4 cycle
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  Return If rc == 0 Then cnt Else rc
Caller
NameDescribe
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