Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smk_user_access - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0

Proto:static ssize_t smk_user_access(struct file *file, const char __user *buf, size_t count, loff_t *ppos, int format)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tcount
loff_t *ppos
intformat
2265  data = simple_transaction_get(file, buf, count)
2266  If IS_ERR(data) Then Return PTR_ERR(data)
2269  If format == Fixed 24byte label format Then
2270  If count < SMK_LOADLEN Then Return -EINVAL
2272  res = smk_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.
2273  Else
2277  res = 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
2280  If res >= 0 Then res = smk_access - determine if a subject has a specific access to an object*@subject: a pointer to the subject's Smack label entry*@object: a pointer to the object's Smack label entry*@request: the access requested, in "MAY" format*@a : a pointer to the audit
2283  Else if res != -ENOENT Then Return res
2289  data[0] = If res >= 0 Then '1' Else '0'
2290  data[1] = '\0'
2292  simple_transaction_set(file, 2)
2294  If format == Fixed 24byte label format Then Return SMK_LOADLEN
2296  Return count
Caller
NameDescribe
smk_write_accesssmk_write_access - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0
smk_write_access2smk_write_access2 - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0